Skip to content
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

APM Event Intake: All errors are considered exceptions. #13055

Closed
zikphil opened this issue Apr 25, 2024 · 1 comment
Closed

APM Event Intake: All errors are considered exceptions. #13055

zikphil opened this issue Apr 25, 2024 · 1 comment
Labels

Comments

@zikphil
Copy link

zikphil commented Apr 25, 2024

APM Server version: Fleet APM Server 8.13.2

Description of the problem including expected versus actual behavior:
Looking at the documentations online it seems that the intake endpoint of APM-server for type: errors also serves the purpose of logging standard messages. It seems that the condition is wheter there is an exception object in the event vs a log object.

This is further confirmed on Kibana looking at index templates / component templates, there seems to be both:

  • logs-apm.app.*-*
  • logs-apm.error-*

However no matter how I format my error event (https://www.elastic.co/guide/en/observability/8.13/apm-api-error.html) it seems that all my messages (log or exceptions) are ending up in the -apm.error data_stream. I've tried using the elasticapm python package and the rum-js-core package for sending the events.

Is this expected to be a future feature or should this be working today?

Steps to reproduce:

  1. Send an error event on the APM Server Intake Endpoint without including an exception object, only including a log object.
  2. Go in Kibana > APM > ACME Service > Errors
  3. You will see your non-error logs there and if you further inspect the error object, you will see the datatype is logs-apm.error.
@zikphil zikphil added the bug label Apr 25, 2024
@zikphil zikphil changed the title APM treats all errors event as an exception APM Event Intake: All errors are considered exceptions. Apr 25, 2024
@axw
Copy link
Member

axw commented Apr 26, 2024

errors also serves the purpose of logging standard messages

The intention here is only to support log records that represent an exception. They are expected to end up in logs-apm.error-*.

It sounds like you want to send logs to APM Server, and have them end up in logs-apm.app.*-*? The best option for this is to use OpenTelemetry. APM Server ingests the OpenTelemetry logs signal via OTLP (see https://www.elastic.co/guide/en/observability/current/apm-open-telemetry-direct.html), however please bear in mind that this is in technical preview.

I'll close this since this is working as designed. Please open a topic at https://discuss.elastic.co/c/observability/82 if you have any follow up questions.

@axw axw closed this as completed Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants