feat(metadata): include many metadata accessible at global or tracer level #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR include the initialization of many new metadata variables that are available in the API:
environment: env or sdk initproject_id: env, sdk init or tracer initapplication_id: env, sdk init or tracer initclient_id: env, sdk init or tracer initsession_id: tracer initSome more fields are set now:
utc_datetimeis setrequest_idis set with one uuid every time the ImpactRow is senttrace_idis set with the highest root tracersession_idis set at tracer init if the user provide itOne trick in this PR is how the fields are set in the
ImpactRow. If we set a field toNone, it will be included in the json sent as we usemodel_dumpwithexclude_unset=True.If we sent metadata with None (let's say
application_id: None), the mock server will fail, and the test suite too.So the function today set the first possible value of the values passed.