-
Notifications
You must be signed in to change notification settings - Fork 80
Using otlphttp exporter for self metrics #2093
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
Open
rafaelwestphal
wants to merge
41
commits into
master
Choose a base branch
from
westphalrafael-agent-otlp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 37 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
b066750
Using otlphttp exporter for self metrics
rafaelwestphal 3e29132
Adding the necessary transformers for agent metric
rafaelwestphal 0969945
Removing extensions when unnecessar
rafaelwestphal 06ae486
Include selfmetrics
rafaelwestphal 6b8674d
Fixing golden
rafaelwestphal 8901822
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 486f335
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 2ca0535
MErging file
rafaelwestphal 68f9c4d
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 27f1487
Fix lint
rafaelwestphal 7c6ab48
Refactoring how to run featureflag tests
rafaelwestphal 0203366
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal fb747cc
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 3d60aa6
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 75b3426
Resuing some processor
rafaelwestphal dad0225
Refactoring code and removing comments
rafaelwestphal d06c53e
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 4b1d06d
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 958fb37
Copying host.id to instance_id to bypass bug 459468648
rafaelwestphal 49d5d56
upDating golden
rafaelwestphal 0f1b0d2
Fixing tranformation test
rafaelwestphal 72f0623
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 193dd21
Adding system specific changes
rafaelwestphal edfe554
formating
rafaelwestphal db9427a
Readjust when the change type from dobule to int
rafaelwestphal a87cb54
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 87f07ee
update golden
rafaelwestphal d85b391
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal aab9b17
Fixing merge
rafaelwestphal ecbc31f
Removing ProjectName since we are obatinng inside the aux funt
rafaelwestphal 939da8e
Removing unnecessary ProjectNaME
rafaelwestphal 9f32772
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 460ca97
update golden
rafaelwestphal 1cf2746
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 06a6d3f
Reverting change to scaler transformation
rafaelwestphal 765ab8d
Add the other changes
rafaelwestphal 3b0a878
Reveting bad scalar changew
rafaelwestphal 0d45cb4
Adding metricstarttime when using otlphtrp
rafaelwestphal d4224ac
Merge branch 'master' into westphalrafael-agent-otlp
rafaelwestphal 936ae3d
Adding function
rafaelwestphal d387e0a
Added metricstarttime exporter to the end of the pipelines
rafaelwestphal 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,6 +86,10 @@ processors: | |
| - googlecloudmonitoring/point_count | ||
| interval/loggingmetrics_7: | ||
| interval: 1m | ||
|
Contributor
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. [Requested changed] Add a |
||
| metricstarttime/agent_prometheus_3: | ||
| strategy: subtract_initial_point | ||
| metricstarttime/ops_agent_3: | ||
| strategy: subtract_initial_point | ||
| metricstarttime/prometheus_3: | ||
| strategy: subtract_initial_point | ||
| metricstransform/fluentbit_1: | ||
|
|
@@ -587,6 +591,16 @@ processors: | |
| include: ^(.*)$$ | ||
| match_type: regexp | ||
| new_name: agent.googleapis.com/$${1} | ||
| resource/agent_prometheus_1: | ||
| attributes: | ||
| - action: insert | ||
| key: gcp.project_id | ||
| value: test-project | ||
| resource/ops_agent_1: | ||
| attributes: | ||
| - action: insert | ||
| key: gcp.project_id | ||
| value: test-project | ||
| resource/prometheus_1: | ||
| attributes: | ||
| - action: insert | ||
|
|
@@ -610,6 +624,12 @@ processors: | |
| - delete_key(resource.attributes, "service.instance.id") | ||
| - delete_key(resource.attributes, "server.port") | ||
| - delete_key(resource.attributes, "url.scheme") | ||
| transform/agent_prometheus_2: | ||
| metric_statements: | ||
| - context: scope | ||
| statements: | ||
| - set(name, "") | ||
| - set(version, "") | ||
| transform/loggingmetrics_0: | ||
| error_mode: ignore | ||
| metric_statements: | ||
|
|
@@ -637,6 +657,12 @@ processors: | |
| - context: datapoint | ||
| statements: | ||
| - set(time, Now()) | ||
| transform/ops_agent_2: | ||
| metric_statements: | ||
| - context: scope | ||
| statements: | ||
| - set(name, "") | ||
| - set(version, "") | ||
| transform/otel_0: | ||
| error_mode: ignore | ||
| metric_statements: | ||
|
|
@@ -783,9 +809,12 @@ service: | |
| - nvml/hostmetrics_1 | ||
| metrics/fluentbit: | ||
| exporters: | ||
| - googlecloud | ||
| - otlphttp/otlp | ||
| processors: | ||
| - transform/agent_prometheus_0 | ||
| - resource/agent_prometheus_1 | ||
| - transform/agent_prometheus_2 | ||
| - metricstarttime/agent_prometheus_3 | ||
| - filter/fluentbit_0 | ||
| - metricstransform/fluentbit_1 | ||
| - resourcedetection/_global_0 | ||
|
|
@@ -794,9 +823,12 @@ service: | |
| - prometheus/agent_prometheus | ||
| metrics/loggingmetrics: | ||
| exporters: | ||
| - googlecloud | ||
| - otlphttp/otlp | ||
| processors: | ||
| - transform/agent_prometheus_0 | ||
| - resource/agent_prometheus_1 | ||
| - transform/agent_prometheus_2 | ||
| - metricstarttime/agent_prometheus_3 | ||
| - transform/loggingmetrics_0 | ||
| - filter/loggingmetrics_1 | ||
| - filter/loggingmetrics_2 | ||
|
|
@@ -812,18 +844,24 @@ service: | |
| - prometheus/agent_prometheus | ||
| metrics/opsagent: | ||
| exporters: | ||
| - googlecloud | ||
| - otlphttp/otlp | ||
| processors: | ||
| - transform/ops_agent_0 | ||
| - resource/ops_agent_1 | ||
| - transform/ops_agent_2 | ||
| - metricstarttime/ops_agent_3 | ||
| - resourcedetection/_global_0 | ||
| - transform/_global_0 | ||
| receivers: | ||
| - otlpjsonfile/ops_agent | ||
| metrics/otel: | ||
| exporters: | ||
| - googlecloud | ||
| - otlphttp/otlp | ||
| processors: | ||
| - transform/agent_prometheus_0 | ||
| - resource/agent_prometheus_1 | ||
| - transform/agent_prometheus_2 | ||
| - metricstarttime/agent_prometheus_3 | ||
| - transform/otel_0 | ||
| - filter/otel_1 | ||
| - filter/otel_2 | ||
|
|
||
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
Oops, something went wrong.
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.
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 is great that now all logic to setup the OTLP exporter instead of the GCM exporter is contained within
ConvertToOtlpExporter!Question
I want to followup on this comment made above :
When the migration to the OTLP exporter is fully completed and we remove all the other exporters (System, OTel , GMP) :
GMPexporter, how is the functionConvertPrometheusExporterToOtlpExportergoing to be renamed/refactored ?I bring up this questions, since i feel the solution of using a "converter" (
ConvertToOtlpExporter) is considering only the intermediate state whereGCMis the main exporter, but will need further refactoring when those are removed. My suggestion here aims to find a solution that won't need any refactoring later.Suggestion
One idea is to have 3 exporter types which help determine the specific processors needed for each pipeline (while keeping the possibility to store the logic in one place ) :
This keeps the abstraction of a "ReceiverPipeline" while also having a way to differentiate the specific requirements of each metric pipeline.
Uh oh!
There was an error while loading. Please reload this page.
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.
Synced offline with @rafaelwestphal. Mentioned eventually we are going to consolidate all
OTLP exporterprocessor logic when the migration is complete. Using aConvertToOtlpExporteris considered an intermediate step since it enables development to happen for each receiver separately.