Skip to content

Commit

Permalink
[pkg/ottl] Rename instrumentation_library to instrumentation_scope in…
Browse files Browse the repository at this point in the history
… ottltraces (#14933)
  • Loading branch information
TylerHelmuth authored Oct 14, 2022
1 parent 18a5147 commit 4ab384b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .chloggen/ottl-fix-trace-is.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Renames accessor for instrumentation scope from `instrumentation_library` to `instrumentation_scope` to match documentation

# One or more tracking issues related to the change
issues: [14933]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
2 changes: 1 addition & 1 deletion pkg/ottl/contexts/ottltraces/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func newPathGetSetter(path []ottl.Field) (ottl.GetSetter[TransformContext], erro
switch path[0].Name {
case "resource":
return ottlcommon.ResourcePathGetSetter[TransformContext](path[1:])
case "instrumentation_library":
case "instrumentation_scope":
return ottlcommon.ScopePathGetSetter[TransformContext](path[1:])
case "trace_id":
if len(path) == 1 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/ottl/contexts/ottltraces/traces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ func Test_newPathGetSetter(t *testing.T) {
name: "instrumentation_scope",
path: []ottl.Field{
{
Name: "instrumentation_library",
Name: "instrumentation_scope",
},
},
orig: refIS,
Expand Down

0 comments on commit 4ab384b

Please sign in to comment.