-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement TelemetryProcessors for Azure exporters #851
Conversation
contrib/opencensus-ext-azure/opencensus/ext/azure/common/processor.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'd like to see a test of callbacks that actually modify the envelope.
The example prose changes look good, but you may want to rearrange the text so it doesn't explain exporter callbacks three times.
@@ -179,6 +203,63 @@ Below is a list of standard metrics that are currently available: | |||
- Process CPU Usage (percentage) | |||
- Process Private Bytes (bytes) | |||
|
|||
You can pass a callback function to the exporter to process telemetry before it is exported. Your callback function can return `False` if you do not want this envelope exported. Your callback function must |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want this text duplicated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine having the text duplicated, we have duplicate documentation for creating an Azure Monitor resource and how to instrument with the instrumentation_key
for each section. Usually users come to this page looking for a specific section (either trace, metrics or logs) so this shouldn't be a eyesore.
), | ||
sampler=ProbabilitySampler(1.0), | ||
) | ||
with tracer.span(name='parent'): | ||
response = requests.get(url='https://www.wikipedia.org/wiki/Rabbit') | ||
|
||
You can pass a callback function to the exporter to process telemetry before it is exported. Your callback function can return `False` if you do not want this envelope exported. Your callback function must |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And again?
Implement TelemetryProcessors for Azure Exporters.
TelemetryProcessors allow users to define a callback function to modify the envelopes before they are sent to the Azure Monitor backend. They can also be used to omit envelopes from being exported. Refer to the
README
on how users can do this and what the schema for the payloads look like.See this article on how other SDKs are doing this in other languages for Azure Monitor.