-
Notifications
You must be signed in to change notification settings - Fork 25.3k
x-pack/plugin/otel: introduce x-pack-otel plugin #111091
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
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
96c5c22
Add YamlTemplateRegistry and OtelIndexTemplateRegistry with resource …
gregkalapos d5861bb
Fix traces-otel template
gregkalapos e58d359
Adding first yml tests
gregkalapos 4b7414c
Base APMIndexTemplateRegistry on YamlTemplateRegistry
gregkalapos b65bb90
Update OTelPlugin.java
gregkalapos fc82339
Update APMIndexTemplateRegistry.java
gregkalapos 72a6769
Update YamlIngestPipelineConfig.java
gregkalapos 9cd50ee
Adding traces tests
gregkalapos 953968f
Update x-pack/plugin/otel-data/src/main/resources/component-templates…
gregkalapos 6206ab3
Add mapper-version
gregkalapos c7ee94c
Fix code-style
gregkalapos effc9c3
Rename `status.status_code` to `status.code`
gregkalapos ae4fc40
Update otel@mappings.yaml
gregkalapos 909a8dd
Move dynamic_templates to metrics@mappings in core
gregkalapos 68ff941
Run gradlew :x-pack:plugin:core:spotlessApply
gregkalapos f0f4e46
Update x-pack/plugin/otel-data/src/main/resources/component-templates…
gregkalapos 595d344
Update 20_metic_tests.yml
gregkalapos 9348218
Update CODEOWNERS
gregkalapos 3c680b0
Change dynamic: strict to false
gregkalapos e61b441
Skip "Reject invalid top level field" test
gregkalapos ecee377
Update 20_metic_tests.yml
gregkalapos 36be656
Add boolean as dimension test (skipping it for now)
gregkalapos 1476c2c
Add booleans_to_keywords and enable corresponding test
gregkalapos 1487373
Remove processor.event top level mapping
gregkalapos c47e086
Remove booleans_to_keywords
gregkalapos 42673ce
Add alias service.language.name -> telemetry.sdk.language
gregkalapos 140bec0
cleanup
gregkalapos 1c61929
Update README.md
gregkalapos 63690ed
Update README.md
gregkalapos c9b617f
Update docs/changelog/111091.yaml
gregkalapos f427564
Move traces@settings and traces@mappings to core
gregkalapos 7e06131
Update traces-otel@mappings.yaml
gregkalapos 717a29a
Review feedback
gregkalapos d5de2a1
Adapt `match` style in tests
gregkalapos 4ca5a21
Update docs/changelog/111091.yaml
gregkalapos 65bfd0b
Apply suggestions from code review
gregkalapos 10287a7
Update x-pack/plugin/otel-data/src/main/resources/component-templates…
gregkalapos a6baf46
Changing trace_flags to long
gregkalapos 7989b12
Remove trace_flags
gregkalapos 2a44ecd
Apply suggestions from code review
gregkalapos a3837fc
Review feedback
gregkalapos 90c8252
Merge branch 'main' into otel_plugin
elasticmachine 846db1d
Add store_array_source for span links
gregkalapos e1adb6a
Define constant `data_stream.type` in `template.yaml`s
gregkalapos dfdcf70
Create package-info.java
gregkalapos 16234d7
Move ecs-tsdb@mappings to index template
felixbarny 0389c37
Update metrics@mappings.json
gregkalapos 9b93b75
Move clusterService.getClusterSettings().addSettingsUpdateConsumer to…
gregkalapos 3152f99
Fix code-style
gregkalapos 680e519
Update x-pack/plugin/otel-data/src/yamlRestTest/resources/rest-api-sp…
gregkalapos ef3468f
Enable logsdb
gregkalapos 3bb6737
Update traces@settings.json
gregkalapos 9f18034
Merge branch 'main' into otel_plugin
elasticmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,5 @@ | ||
pr: 111091 | ||
summary: "X-pack/plugin/otel: introduce x-pack-otel plugin" | ||
area: Data streams | ||
type: feature | ||
issues: [] |
This file contains hidden or 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
This file contains hidden or 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
43 changes: 0 additions & 43 deletions
43
x-pack/plugin/apm-data/src/main/java/org/elasticsearch/xpack/apmdata/ResourceUtils.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
x-pack/plugin/apm-data/src/main/resources/component-templates/traces@mappings.yaml
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
44 changes: 44 additions & 0 deletions
44
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/template/ResourceUtils.java
This file contains hidden or 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,44 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.core.template; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.nio.charset.StandardCharsets; | ||
import java.util.Map; | ||
|
||
public class ResourceUtils { | ||
static byte[] loadVersionedResourceUTF8(Class<?> clazz, String name, int version, String versionProperty) { | ||
return loadVersionedResourceUTF8(clazz, name, version, versionProperty, Map.of()); | ||
} | ||
|
||
static byte[] loadVersionedResourceUTF8( | ||
Class<?> clazz, | ||
String name, | ||
int version, | ||
String versionProperty, | ||
Map<String, String> variables | ||
) { | ||
try { | ||
String content = loadResource(clazz, name); | ||
content = TemplateUtils.replaceVariables(content, String.valueOf(version), versionProperty, variables); | ||
return content.getBytes(StandardCharsets.UTF_8); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
|
||
public static String loadResource(Class<?> clazz, String name) throws IOException { | ||
InputStream is = clazz.getResourceAsStream(name); | ||
if (is == null) { | ||
throw new IOException("Resource [" + name + "] not found in classpath."); | ||
} | ||
return new String(is.readAllBytes(), java.nio.charset.StandardCharsets.UTF_8); | ||
} | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.