Adding ingestion time in logs upto nanoseconds for more precision

Can I Add ingestion time in logs upto nanoseconds for more precision by specifying it somewhere in the configuration file???

Yes but you will need to do it with something like ruby and then add it to another field.
The current timestamp field can't cope with nanoseconds unfortunately, there is an issue for it though.

Is there an example for this issue? Like a sample ruby script?