Write deprecation logs to a data stream#61484
Conversation
|
Pinging @elastic/es-core-infra (:Core/Infra/Logging) |
9125b65 to
126f0ca
Compare
.../src/main/java/org/elasticsearch/xpack/deprecation/logging/DeprecationIndexingComponent.java
Outdated
Show resolved
Hide resolved
|
@elasticmachine run elasticsearch-ci/packaging-sample-windows |
.../src/main/java/org/elasticsearch/xpack/deprecation/logging/DeprecationIndexingComponent.java
Show resolved
Hide resolved
...n/src/main/java/org/elasticsearch/xpack/deprecation/logging/DeprecationIndexingAppender.java
Show resolved
Hide resolved
jakelandis
left a comment
There was a problem hiding this comment.
looking good. a couple of comments and a PR to this PR pugnascotia#3 (to ensure using the latest testing plugins)
update gradle config for new testing plugins
jakelandis
left a comment
There was a problem hiding this comment.
tested locally and worked great! LGTM
| .field("data_stream.type", "logs") | ||
| .field("data_stream.datatype", "deprecation") | ||
| .field("data_stream.namespace", "elasticsearch") | ||
| .field("ecs.version", ECS_VERSION) |
pgomulka
left a comment
There was a problem hiding this comment.
LGTM,
we would need to update beats test samples (with new fields). I can help with this.
Backport of elastic#61484. Closes elastic#46106. Implement a new log4j appender for deprecation logging, in order to write logs to a dedicated data stream. This is controlled by a new setting, `cluster.deprecation_indexing.enabled`.
|
|
||
| return new ESLogMessage(messagePattern, args) | ||
| .field("data_stream.type", "logs") | ||
| .field("data_stream.datatype", "deprecation") |
There was a problem hiding this comment.
@pugnascotia This should be data_stream.dataset to be aligned with the indexing strategy.
I would also propose to keep the namespace as default and use deprecation.elasticsearch as the dataset name. Only important thing is that the dataset does not contain a -.
There was a problem hiding this comment.
@ruflin so would we have the following, then?
.field("data_stream.dataset", "default")
.field("data_stream.namespace", "deprecation.elasticsearch")
There was a problem hiding this comment.
No, the other way around:
.field("data_stream.dataset", "deprecation.elasticsearch")
.field("data_stream.namespace", "default")
There was a problem hiding this comment.
Thanks, I'll get that changed 👍
Closes #46106. Implement a new log4j appender for deprecation logging, in order to write logs to a dedicated data stream. This is controlled by a new setting,
cluster.deprecation_indexing.enabled.Depends on #61474.
Test by running
./gradlew runand then: