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

Use dynatrace-metric-utils #9295

Merged
merged 16 commits into from
Jun 8, 2021

Conversation

dyladan
Copy link
Contributor

@dyladan dyladan commented May 24, 2021

  • Updated associated README.md.
  • Wrote appropriate unit tests.

Dynatrace Metrics Exporter: Use the metric utils library maintained by Dynatrace Open Source to normalize and serialize metrics for the Dynatrace metrics ingest v2 endpoint.

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

1 similar comment
@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@dyladan
Copy link
Contributor Author

dyladan commented May 24, 2021

I know my company has signed the corporate CLA because my coworker @thschue has contributed here, but my manager is out for an Austrian holiday today so I might have to wait for tomorrow to figure out how to get my account authorized on that CLA. Unless someone else can help me determine how to convince the CLA check that I'm ok?

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@helenosheaa
Copy link
Member

@dyladan, the tiger bot is looking for your email or github name on our CLA list. So you'll also have to sign the CLA you can find it here, thanks!

@dyladan
Copy link
Contributor Author

dyladan commented May 24, 2021

This is the individual agreement. I believe my company already signed a company agreement. Do i still need to do the individual one?

@helenosheaa
Copy link
Member

From looking at our CLA stuff on the website here I think you still need to sign an individual one. But may also be worth checking with your manager to get your details on the company one.

@dyladan
Copy link
Contributor Author

dyladan commented May 24, 2021

Yeah I'll check with him tomorrow as Austria is on holiday today.

@helenosheaa helenosheaa added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label May 24, 2021
@dyladan
Copy link
Contributor Author

dyladan commented May 25, 2021

He's looking into getting me added to the corporate CLA, but this PR is ready for review in any case. It has already been through our internal review process and we have a couple of other changes that are in our internal review pipeline which will depend on it.

@dyladan
Copy link
Contributor Author

dyladan commented May 26, 2021

!signed-cla

@dyladan
Copy link
Contributor Author

dyladan commented Jun 1, 2021

Readme updated and CLA signed. Would appreciate a review when it is convenient because I have several follow-ups that will depend on this PR.

@dyladan
Copy link
Contributor Author

dyladan commented Jun 7, 2021

Would really appreciate reviews on this. @ssoroka looks like you reviewed the last Dynatrace PR so your input would be appreciated.

Copy link
Member

@helenosheaa helenosheaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Few comments in the code.

My main question is whether this changes the schema of the metric ie will this break backwards compatibility for users. Would it be worth putting this change under a metric_version = 2 so that people can default to the previous behavior?

plugins/outputs/dynatrace/dynatrace.go Show resolved Hide resolved
url = "https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest"

## API token is required if a URL is specified and should be restricted to the 'Ingest metrics' scope
api_token = "your API token here" // hard-coded for illustration only, should be read from environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this make more sense api_token = "$API_TOKEN"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change that. we didn't want to imply that the api token was automatically included in the environment or something

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either that or leave it as an empty string with a comment above

plugins/outputs/dynatrace/dynatrace.go Show resolved Hide resolved
@dyladan
Copy link
Contributor Author

dyladan commented Jun 7, 2021

Thanks for the PR. Few comments in the code.

My main question is whether this changes the schema of the metric ie will this break backwards compatibility for users. Would it be worth putting this change under a metric_version = 2 so that people can default to the previous behavior?

I wouldn't put it behind a version 2 because the format is the same and the normalization rules aren't different, but more corner cases are handled which will be able to handle a larger variety of names and prevent them from being dropped by our backend.

@dyladan
Copy link
Contributor Author

dyladan commented Jun 7, 2021

The CI is telling me to run go mod tidy but when I run that command the go.sum isn't updated. Is there something else that might be failing?

@helenosheaa
Copy link
Member

Make sure you're on the latest Go version when you run go mod tidy

@helenosheaa
Copy link
Member

Thanks for the PR. Few comments in the code.
My main question is whether this changes the schema of the metric ie will this break backwards compatibility for users. Would it be worth putting this change under a metric_version = 2 so that people can default to the previous behavior?

I wouldn't put it behind a version 2 because the format is the same and the normalization rules aren't different, but more corner cases are handled which will be able to handle a larger variety of names and prevent them from being dropped by our backend.

Ok I just wanted to be sure on the above. I'll try and get you another review from someone else this week so we can move forward with the PR.

@dyladan
Copy link
Contributor Author

dyladan commented Jun 7, 2021

Make sure you're on the latest Go version when you run go mod tidy

Even on the latest go (1.16.5) I am still getting no changes on go mod tidy

@pirgeo
Copy link
Contributor

pirgeo commented Jun 8, 2021

Same here, I tried checking out this branch and running go mod tidy (on go version go1.16 linux/amd64 and go version go1.16.5 linux/amd64) but there are no changes in the go.sum file.

@dyladan
Copy link
Contributor Author

dyladan commented Jun 8, 2021

Deleting and recreating the go.sum seems to have worked :)

@reimda reimda merged commit 298670a into influxdata:master Jun 8, 2021
@dyladan dyladan deleted the dt-metric-utils branch June 9, 2021 13:35
reimda pushed a commit that referenced this pull request Jun 10, 2021
(cherry picked from commit 298670a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants