-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add live metrics collection of requests/dependencies/exceptions #34673
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c674549
move state
lzchen 6ddd599
collection
lzchen e2df1e0
exceptions
lzchen fbe7c2b
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
lzchen 7c031c4
Update CHANGELOG.md
lzchen bc4a40a
utils
lzchen d6901b4
sample
lzchen b1769dc
sample
lzchen 8c104eb
documentingress
lzchen d4ebbfd
feedback
lzchen be403e4
Update _utils.py
lzchen aeaa0d9
record span
lzchen b979900
log_record
lzchen 81f8aec
convert
lzchen f556415
utils
lzchen ff42bc0
lint
lzchen 0555786
lint
lzchen b1f5fbe
lint
lzchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
exceptions
- Loading branch information
commit e2df1e0832d8dab5b8a570cda9a31c86fbfaec91
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...emetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_log_record_processor.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
|
|
||
| from opentelemetry.sdk._logs import LogData, LogRecordProcessor | ||
|
|
||
| from azure.monitor.opentelemetry.exporter._quickpulse._live_metrics import record_log_record | ||
|
|
||
|
|
||
| class _QuickpulseLogRecordProcessor(LogRecordProcessor): | ||
|
|
||
| def emit(self, log_data: LogData) -> None: | ||
| record_log_record(log_data) | ||
| super().emit(log_data) | ||
|
|
||
| def shutdown(self): | ||
| super().shutdown() | ||
|
|
||
| def force_flush(self, timeout_millis: int = 30000): | ||
| super().force_flush(timeout_millis=timeout_millis) |
13 changes: 13 additions & 0 deletions
13
...pentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_span_processor.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
|
|
||
| from opentelemetry.sdk.trace import ReadableSpan, SpanProcessor | ||
|
|
||
| from azure.monitor.opentelemetry.exporter._quickpulse._live_metrics import record_span | ||
|
|
||
|
|
||
| class _QuickpulseSpanProcessor(SpanProcessor): | ||
|
|
||
| def on_end(self, span: ReadableSpan) -> None: | ||
| record_span(span) | ||
| return super().on_end(span) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.