-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Schema Processor Revamp [Part 3] - Translation (#37403)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This is a slice of changes from #35248 This PR details Translation which defines the complete abstraction of schema translation file. It manages Revisions to move between two versions of a schema <!--Describe what testing was performed and which tests were added.--> #### Testing Unit tests
- Loading branch information
1 parent
10a547a
commit 3cc420c
Showing
11 changed files
with
1,546 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
processor/schemaprocessor/internal/translation/testdata/1.6.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
file_format: 1.0.0 | ||
schema_url: https://opentelemetry.io/schemas/1.6.1 | ||
versions: | ||
1.6.1: | ||
1.5.0: | ||
1.4.0: | ||
1.0.0: |
16 changes: 16 additions & 0 deletions
16
processor/schemaprocessor/internal/translation/testdata/1.9.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
file_format: 1.0.0 | ||
schema_url: https://opentelemetry.io/schemas/1.9.0 | ||
versions: | ||
1.9.0: | ||
1.8.0: | ||
spans: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
db.cassandra.keyspace: db.name | ||
db.hbase.namespace: db.name | ||
1.7.0: | ||
1.6.1: | ||
1.5.0: | ||
1.4.0: | ||
1.0.0: |
83 changes: 83 additions & 0 deletions
83
processor/schemaprocessor/internal/translation/testdata/complex_changeset.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
file_format: 1.0.0 | ||
schema_url: https://example.com/1.7.0 | ||
versions: | ||
1.7.0: | ||
logs: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
process.stacktrace: application.stacktrace | ||
1.5.0: | ||
metrics: | ||
changes: | ||
- rename_metrics: | ||
container.restart: container.restart.total | ||
1.4.0: # The time we cared about privacy within spans and span events | ||
spans: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
user.operation: privacy.user.operation | ||
span_events: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
net.user.ip: privacy.net.user.ip | ||
1.2.0: | ||
all: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
test.suite: test.name | ||
1.1.0: | ||
all: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
test-suite: test.suite | ||
resources: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
resource-description: resource.description | ||
spans: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
operation: user.operation | ||
- rename_attributes: | ||
attribute_map: | ||
operation.failure: operation.failed.reason | ||
apply_to_spans: | ||
- HTTP GET | ||
- HTTP POST | ||
span_events: | ||
changes: | ||
- rename_events: | ||
name_map: | ||
stacktrace: stack_trace | ||
- rename_attributes: | ||
attribute_map: | ||
net.peer.ip : net.user.ip | ||
- rename_attributes: | ||
attribute_map: | ||
proxy-addr: proxy.addr | ||
apply_to_events: | ||
- proxy.dial | ||
metrics: | ||
changes: | ||
- rename_metrics: | ||
container.respawn: container.restart | ||
- rename_attributes: | ||
attribute_map: | ||
container-exit-code: container.exit.status | ||
apply_to_metrics: | ||
- container.stop | ||
- container.restart | ||
logs: | ||
changes: | ||
- rename_attributes: | ||
attribute_map: | ||
go.stacktrace: process.stacktrace | ||
1.0.0: |
Oops, something went wrong.