You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,7 @@ If you do not have a [Logz.io](http://logz.io) account, you can sign up for a fr
58
58
-**callback** - A callback function called when an unrecoverable error has occured in the logger. The function API is: function(err) - err being the Error object.
59
59
-**timeout** - The read/write/connection timeout in milliseconds.
60
60
-**addTimestampWithNanoSecs** - Add a timestamp with nano seconds granularity. This is needed when many logs are sent in the same millisecond, so you can properly order the logs in kibana. The added timestamp field will be `@timestamp_nano` Default: `false`
61
+
-**addOtelContext** - Add `trace_id`, `span_id`, `service_name` fields to logs when opentelemetry context is available. Default: `true`
61
62
-**compress** - If true the the logs are compressed in gzip format. Default: `false`
62
63
-**internalLogger** - set internal logger that supports the function log. Default: console.
63
64
-**setUserAgent** - Set to `false` to send logs without the user-agent field in the request header. Default:`true`. If you want to send data from Firefox browser, set that option to `false`.
@@ -164,6 +165,29 @@ tsc --project tsconfig.json
164
165
165
166
</div>
166
167
168
+
## Add opentelemetry context
169
+
If you're sending traces with OpenTelemetry instrumentation (auto or manual), you can correlate your logs with the trace context. That way, your logs will have traces data in it, such as service name, span id and trace id (version >= `5.2.0`).
170
+
171
+
This feature is enabled by default, To disable it, set the `AddOtelContext` param in your handler configuration to `false`, like in this example:
0 commit comments