-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: prometheus translation add support for rw2 #35583
feat: prometheus translation add support for rw2 #35583
Conversation
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.
Thank you @jmichalek132! Super nice to see progress here :)
I think we can make this initial task even smaller, so we can get something mergeable faster. What do you think?
// createAttributes creates a slice of Prometheus Labels with OTLP attributes and pairs of string values. | ||
// Unpaired string values are ignored. String pairs overwrite OTLP labels if collisions happen and | ||
// if logOnOverwrite is true, the overwrite is logged. Resulting label names are sanitized. | ||
func createAttributesV2(resource pcommon.Resource, attributes pcommon.Map, externalLabels map[string]string, |
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.
I wonder if we could reduce the scope of the first PR even further. Maybe just translate gauges datapoints to samples, without any labels.
tsMap, err := FromMetricsV2(payload.Metrics(), settings) | ||
require.NoError(t, err) | ||
require.NotNil(t, tsMap) |
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 plan to change this, right? Like, asserting that we return real metrics
labels := createAttributesV2( | ||
resource, | ||
pt.Attributes(), | ||
settings.ExternalLabels, | ||
nil, | ||
true, | ||
model.MetricNameLabel, | ||
name, | ||
) |
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.
What do you think about ignoring labels for the first PR?
Signed-off-by: Juraj Michalek <juraj.michalek132@gmail.com>
Signed-off-by: Juraj Michalek <juraj.michalek132@gmail.com>
Closing in favor of #35703. |
Description:
Draft starting the work on adding support for remote write 2.0 in the translation package.
Link to tracking Issue: #33661
Testing:
Documentation: