Skip to content

Commit

Permalink
[processor/resourcerdetection] Fix heroku config interface
Browse files Browse the repository at this point in the history
Fix config option for `service.name` attribute set by heroku detector. It was added under mismatching `heroku.app.name` config option
  • Loading branch information
dmitryax committed Jul 17, 2023
1 parent 0c7c694 commit 8dfeed0
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 16 deletions.
15 changes: 15 additions & 0 deletions .chloggen/resource-detection-processor-fix-heroku-attr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: processor/resourcedetection

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix config option for service.name attribute

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [24355]
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (d *detector) Detect(_ context.Context) (resource pcommon.Resource, schemaU
attrs.PutStr(herokuAppID, v)
}
}
if d.resourceAttributes.HerokuAppName.Enabled {
if d.resourceAttributes.ServiceName.Enabled {
if v, ok := os.LookupEnv("HEROKU_APP_NAME"); ok {
attrs.PutStr(conventions.AttributeServiceName, v)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ all_set:
enabled: true
heroku.app.id:
enabled: true
heroku.app.name:
enabled: true
heroku.dyno.id:
enabled: true
heroku.release.commit:
Expand All @@ -17,14 +15,14 @@ all_set:
enabled: true
service.instance.id:
enabled: true
service.name:
enabled: true
none_set:
resource_attributes:
cloud.provider:
enabled: false
heroku.app.id:
enabled: false
heroku.app.name:
enabled: false
heroku.dyno.id:
enabled: false
heroku.release.commit:
Expand All @@ -35,3 +33,5 @@ none_set:
enabled: false
service.instance.id:
enabled: false
service.name:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ resource_attributes:
description: The heroku.app.id
enabled: true
type: string
heroku.app.name:
description: The heroku.app.name
enabled: true
type: string
heroku.dyno.id:
description: The heroku.dyno.id
enabled: true
Expand All @@ -34,4 +30,8 @@ resource_attributes:
service.instance.id:
description: The service.instance.id
type: string
enabled: true
enabled: true
service.name:
description: Heroku app name set as service.name.
enabled: true
type: string

0 comments on commit 8dfeed0

Please sign in to comment.