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

Add common signalfx host id extraction #1100

Merged
merged 12 commits into from
Sep 28, 2020
Merged

Add common signalfx host id extraction #1100

merged 12 commits into from
Sep 28, 2020

Conversation

jrcamp
Copy link
Contributor

@jrcamp jrcamp commented Sep 23, 2020

This adds a shared way to extract AWSUniqueId and gcp_id dimensions. It will be
used by both sapmexporter and signalfxexporter. signalfxexporter cannot
currently use the method because it's not on pdata and it seemed silly to
unconvert metrics data back to pdata. I've added a note to signalfxexporter to
use this common implementation once it switches to pdata.

@jrcamp jrcamp requested review from keitwb and a team September 23, 2020 18:31
@@ -416,6 +416,7 @@ func float64ToDimValue(f float64) string {
// resource attributes, including a cloud host id (AWSUniqueId, gcp_id, etc.)
// if it can be constructed from the provided metadata.
func appendResourceAttributesToDimensions(dims []*sfxpb.Dimension, resourceAttr map[string]string) []*sfxpb.Dimension {
// TODO: Replace with internal/common/splunk/hostid.go once signalfxexporter is converted to pdata.
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you going to still remove the resource attributes used to derive the host id like the code below in this function does? If so, it seems like there will need to be something more that the hostid module does to facilitate that instead of having to know the exact fields here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, sapm won't remove them since for traces we want all those tags. I think signalfxexporter will probably need to maintain its own list of labels/dimensions to filter out. It doesn't need to be per-provider type like it is today, it can just delete all of them (provider, account id, region, zone, etc. regardless of provider type).

This adds a shared way to extract AWSUniqueId and gcp_id dimensions. It will be
used by both sapmexporter and signalfxexporter. signalfxexporter cannot
currently use the method because it's not on pdata and it seemed silly to
unconvert metrics data back to pdata. I've added a note to signalfxexporter to
use this common implementation once it switches to pdata.
@codecov
Copy link

codecov bot commented Sep 24, 2020

Codecov Report

Merging #1100 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1100      +/-   ##
==========================================
+ Coverage   89.01%   89.04%   +0.02%     
==========================================
  Files         260      261       +1     
  Lines       12413    12438      +25     
==========================================
+ Hits        11050    11075      +25     
  Misses       1011     1011              
  Partials      352      352              
Flag Coverage Δ
#integration 73.57% <0.00%> (-1.96%) ⬇️
#unit 88.10% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
exporter/signalfxexporter/translation/converter.go 99.45% <ø> (ø)
internal/common/splunk/hostid.go 100.00% <100.00%> (ø)
...resourcedetectionprocessor/internal/aws/ec2/ec2.go 90.00% <100.00%> (ø)
...resourcedetectionprocessor/internal/gcp/gce/gce.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b94b17...b74f189. Read the comment docs.

Comment on lines +19 to +21
ProviderAWS = "aws"
// ProviderGCP is used in cloud.provider label for GCP.
ProviderGCP = "gcp"
Copy link
Member

Choose a reason for hiding this comment

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

Should this be in core semantic conventions or this is Splunk convention only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aws and gcp are called out as examples in the conventions (https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/semantic_conventions/cloud.md). Should I create a PR to amend semantic conventions to make it explicit that these values should be used for the platforms? If so I think then it'd make sense to put this in translator/conventions/opentelemetry.go.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, best to add to core conventions.

internal/common/splunk/hostid.go Outdated Show resolved Hide resolved
internal/common/splunk/hostid.go Show resolved Hide resolved
Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

LGTM, I can merge as is if you prefer and you can move conventions to core in separate PR.

@jrcamp
Copy link
Contributor Author

jrcamp commented Sep 25, 2020

Ok let's do that, will open PR to spec to add to conventions and update here once it lands.

@jrcamp
Copy link
Contributor Author

jrcamp commented Sep 25, 2020

Ok let's do that, will open PR to spec to add to conventions and update here once it lands.

open-telemetry/opentelemetry-specification#1018

@dmitryax
Copy link
Member

@tigrannajaryan @bogdandrutu can we merge this? I have a PR which depends on it

@tigrannajaryan tigrannajaryan merged commit 25ffd5a into open-telemetry:master Sep 28, 2020
dyladan referenced this pull request in dynatrace-oss-contrib/opentelemetry-collector-contrib Jan 29, 2021
…#1100)

Since OTLP span kinds has 1-1 mapping with OpenTracing specification we don't need to keep additional "span.kind" value as was done in OC internal representation.

The commit fixes the issue: open-telemetry/opentelemetry-collector#878
ljmsc referenced this pull request in ljmsc/opentelemetry-collector-contrib Feb 21, 2022
Add check for github-actions.
Add missing examples and SDK go.mod
Remove redundant comments.
Change check to be weekly on Sunday to reduce load and churn.
Sort alphanumerically.
Add check to Makefile to ensure if there is a `go.mod` file there is a dependabot entry for that directory.
codeboten pushed a commit that referenced this pull request Nov 23, 2022
The failing test was introduced I believe by a change in behaviour noted in this issue: getmoto/moto#3292. The solution is to set a region in the create_bucket call.

Fixes #1088
codeboten pushed a commit that referenced this pull request Nov 23, 2022
The failing test was introduced I believe by a change in behaviour noted in this issue: getmoto/moto#3292. The solution is to set a region in the create_bucket call.

Fixes #1088
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants