Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Implement TelemetryProcessors for Azure exporters#851

Merged
lzchen merged 14 commits intocensus-instrumentation:masterfrom
lzchen:initializer
Jan 29, 2020
Merged

Implement TelemetryProcessors for Azure exporters#851
lzchen merged 14 commits intocensus-instrumentation:masterfrom
lzchen:initializer

Conversation

@lzchen
Copy link
Copy Markdown
Contributor

@lzchen lzchen commented Jan 27, 2020

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.

@lzchen lzchen requested a review from c24t January 27, 2020 19:32
@lzchen lzchen changed the title Implement TelemetryInitializer for Azure exporters Implement TelemetryProcessors for Azure exporters Jan 27, 2020
Copy link
Copy Markdown
Member

@c24t c24t left a 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.

- 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
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor Author

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.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And again?

@lzchen lzchen merged commit 4f4f020 into census-instrumentation:master Jan 29, 2020
@lzchen lzchen deleted the initializer branch January 29, 2020 00:42
@lzchen lzchen mentioned this pull request Feb 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants