logging - Parse logs with opentelemetry collector - Stack Overflow

Im trying parse logs received in my opentelemetry collector from one application in spring boot using l

Im trying parse logs received in my opentelemetry collector from one application in spring boot using logback by grpc with otlp protoco and finally send to elasticsearch by collector opentelemetry-collector-contrib:0.117.0

My intention is from this example log:

2025-02-26T09:00:13.611503606+01:00 DEBUG [2025-02-26 09:00:13,610] [.springframework.kafka.KafkaListenerEndpointContainer#15-0-C-1] [] [UpdateSettingsListener] Handling command UpdateSettingsMessage[**context=SAAI-egypt**, additional={interval_canceled=20, booking_status=[1, 3], api_keys=[api-key], last_fetch_date=2025-02-26T08:00:03.985Z, date_filter_mode=3, interval_active=10}], received at 1740556813610

I've tried all types of processors: transform, text, etc but nothing works...

Extract a new field "context" with dynamic value in every log for output in elasticsearch:

Desired result:

{
  "_index": ".ds-dvlp-op-ci-bin-log-2025.02.25-000062",
  "_id": "0nfqQZUBuQEk-wxXPD8h",
  "_version": 1,
  "_score": 0,
  "_source": {
    "@timestamp": "2025-02-26T11:00:08.839000000Z",
    "Body": "Command: UpdateAdditionalSettings[lastFetchDate=2025-02-26T11:00:01.973Z, context=SAAI-egypt] executed at 1740567608839",
  "context": SAAI-egypt
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745062965a4609079.html

相关推荐

  • logging - Parse logs with opentelemetry collector - Stack Overflow

    Im trying parse logs received in my opentelemetry collector from one application in spring boot using l

    21小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信