Skip to content
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

fix(gcp_stackdriver_metrics)!: fixes invalid format for gcp metrics (#14890) #16089

Closed

Conversation

ansel1
Copy link

@ansel1 ansel1 commented Jan 24, 2023

Confirmed with manual testing, this does fix compatibility with gcp monitoring. I can push metrics. But there is a side effect. Because this struct is used both for configuration and for calling the gcp API, it changes the structure of the configuration. You need to move the resource labels to a "labels" attribute, like this:

[sinks.my_sink_id]
type = "gcp_stackdriver_metrics"
inputs = [ "my-source-or-transform-id" ]
credentials_path = "/path/to/credentials.json"
project_id = "vector-123456"

[sinks.my_sink_id.resource]
type = "global"
labels = {projectId = "vector-123456", instanceId = "Twilight", zone = "us-central1-a"}

Not sure if that is ok...this sink was totally broken I think, so I guess no one is using it.

I see in the v0.22.0 highlights, it seems this flattening of the labels was intentional.
https://github.com/vectordotdev/vector/blob/master/website/content/en/highlights/2022-05-03-0-22-0-upgrade-guide.md?plain=1#L31

The alternative, to keep the flattened labels in the config, would be to use a different struct for config vs serialization?

@netlify
Copy link

netlify bot commented Jan 24, 2023

Deploy Preview for vrl-playground canceled.

Name Link
🔨 Latest commit d8db62b
🔍 Latest deploy log https://app.netlify.com/sites/vrl-playground/deploys/63cf406747c8b20008d6af29

@github-actions github-actions bot added the domain: sinks Anything related to the Vector's sinks label Jan 24, 2023
@netlify
Copy link

netlify bot commented Jan 24, 2023

Deploy Preview for vector-project canceled.

Name Link
🔨 Latest commit d8db62b
🔍 Latest deploy log https://app.netlify.com/sites/vector-project/deploys/63cf40674b7c9e0009913235

@jszwedko
Copy link
Member

Replaced by #16394 . Let me know if that's wrong @ansel1 !

@jszwedko jszwedko closed this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sinks Anything related to the Vector's sinks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants