-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Configure OTEL Collector to observe Internal Telemetry #5752
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
Changes from all commits
35c9f22
64fbda6
9fa70b5
3b20fb9
29d0096
153ae08
f1bbcbf
325f86a
b4aa97a
81b356b
6f13e50
24f5a02
4d65a4b
a024fff
ce37882
bc15455
dfb9633
a71c17b
128cbcb
9eecdd6
b2f18ee
eb87c18
4a76314
885c057
eedb4c5
495577a
f410b06
ae542e5
74f234b
e186026
1ffdd72
0f797f6
2056e10
f734071
ee81032
0493b6c
aeb7646
9a3536d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,13 @@ service: | |
receivers: [otlp, jaeger, zipkin] | ||
processors: [batch] | ||
exporters: [jaeger_storage_exporter] | ||
telemetry: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is just one of many config files, we need to make similar changes to all of them, and to validate that the unique metrics produced by each binary/config are the same as in v1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, that can be taken as the next step. |
||
resource: | ||
service.name: jaeger | ||
metrics: | ||
level: detailed | ||
# TODO Initialize telemetery tracer once OTEL released new feature. | ||
Wise-Wizard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# https://github.com/open-telemetry/opentelemetry-collector/issues/10663 | ||
|
||
extensions: | ||
jaeger_query: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Run the following commands first to create the JSON files: | ||
# Run V1 Binary | ||
# prom2json http://localhost:14269/metrics > V1_Metrics.json | ||
# Run V2 Binary | ||
# prom2json http://localhost:8888/metrics > V2_Metrics.json | ||
|
||
import json | ||
|
||
# Load the JSON files | ||
v1_metrics_path = "./V1_Metrics.json" | ||
v2_metrics_path = "./V2_Metrics.json" | ||
|
||
with open(v1_metrics_path, 'r') as file: | ||
v1_metrics = json.load(file) | ||
|
||
with open(v2_metrics_path, 'r') as file: | ||
v2_metrics = json.load(file) | ||
|
||
# Extract names and labels of the metrics | ||
def extract_metrics_with_labels(metrics): | ||
result = {} | ||
for metric in metrics: | ||
name = metric['name'] | ||
labels = {} | ||
if 'metrics' in metric and 'labels' in metric['metrics'][0]: | ||
labels = metric['metrics'][0]['labels'] | ||
result[name] = labels | ||
return result | ||
|
||
v1_metrics_with_labels = extract_metrics_with_labels(v1_metrics) | ||
v2_metrics_with_labels = extract_metrics_with_labels(v2_metrics) | ||
|
||
# Compare the metrics names and labels | ||
common_metrics = {} | ||
v1_only_metrics = {} | ||
v2_only_metrics = {} | ||
|
||
for name, labels in v1_metrics_with_labels.items(): | ||
if name in v2_metrics_with_labels: | ||
if labels == v2_metrics_with_labels[name]: | ||
common_metrics[name] = labels | ||
else: | ||
v1_only_metrics[name] = labels | ||
else: | ||
v1_only_metrics[name] = labels | ||
|
||
for name, labels in v2_metrics_with_labels.items(): | ||
if name not in v1_metrics_with_labels: | ||
v2_only_metrics[name] = labels | ||
|
||
differences = { | ||
"common_metrics": common_metrics, | ||
"v1_only_metrics": v1_only_metrics, | ||
"v2_only_metrics": v2_only_metrics | ||
} | ||
|
||
# Write the differences to a new JSON file | ||
differences_path = "./differences.json" | ||
with open(differences_path, 'w') as file: | ||
json.dump(differences, file, indent=4) | ||
|
||
print(f"Differences written to {differences_path}") |
Uh oh!
There was an error while loading. Please reload this page.