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

Setting event timestamp from OTel observed timestamp #11935

Merged
merged 14 commits into from
Nov 16, 2023

Conversation

LikeTheSalad
Copy link
Contributor

@LikeTheSalad LikeTheSalad commented Oct 24, 2023

Motivation/summary

Setting event timestamp from OTel observed timestamp when needed.

apm-data: elastic/apm-data#166

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

@LikeTheSalad LikeTheSalad requested a review from a team as a code owner October 24, 2023 14:51
@mergify
Copy link
Contributor

mergify bot commented Oct 24, 2023

This pull request does not have a backport label. Could you fix it @LikeTheSalad? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-7.17 is the label to automatically backport to the 7.17 branch.
  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Oct 24, 2023
@mergify
Copy link
Contributor

mergify bot commented Oct 25, 2023

This pull request is now in conflicts. Could you fix it @LikeTheSalad? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b otel-observed-timestamp upstream/otel-observed-timestamp
git merge upstream/main
git push upstream otel-observed-timestamp

@simitt
Copy link
Contributor

simitt commented Oct 26, 2023

@LikeTheSalad apologies for the review, I'll approve once the conflicts are fixed.

@kruskall
Copy link
Member

We might to wait before merging this until we sort out otel partial success PR elastic/apm-data#156

@mergify
Copy link
Contributor

mergify bot commented Oct 26, 2023

This pull request is now in conflicts. Could you fix it @LikeTheSalad? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b otel-observed-timestamp upstream/otel-observed-timestamp
git merge upstream/main
git push upstream otel-observed-timestamp

Copy link
Contributor

mergify bot commented Nov 13, 2023

This pull request is now in conflicts. Could you fix it @LikeTheSalad? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b otel-observed-timestamp upstream/otel-observed-timestamp
git merge upstream/main
git push upstream otel-observed-timestamp

@LikeTheSalad
Copy link
Contributor Author

We might to wait before merging this until we sort out otel partial success PR elastic/apm-data#156

@kruskall @simitt What's the status on this?

Copy link
Contributor

mergify bot commented Nov 15, 2023

This pull request is now in conflicts. Could you fix it @LikeTheSalad? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b otel-observed-timestamp upstream/otel-observed-timestamp
git merge upstream/main
git push upstream otel-observed-timestamp

@kruskall
Copy link
Member

kruskall commented Nov 16, 2023

@LikeTheSalad the breaking change should be fixed after elastic/apm-data#172

We can merge this! Can you fix the conflicts ?

@kruskall kruskall enabled auto-merge (squash) November 16, 2023 08:37
@kruskall kruskall merged commit 9029f16 into elastic:main Nov 16, 2023
11 checks passed
@LikeTheSalad LikeTheSalad deleted the otel-observed-timestamp branch November 16, 2023 09:01
@carsonip carsonip self-assigned this Dec 20, 2023
@carsonip
Copy link
Member

Testing notes

✔️ test-plan-ok

Using a patched version of python otel exporter that sends observed_timestamp with no timestamp, send the following logs to apm-server 8.12

LogRecord #0
ObservedTimestamp: 2020-01-20 14:57:21 +0000 UTC
Timestamp: 1970-01-01 00:00:00 +0000 UTC
SeverityText: WARNING
SeverityNumber: Warn(13)
Body: Str(Jail zesty vixen who grabbed pay from quack.)
Trace ID: 
Span ID: 
Flags: 0
LogRecord #1
ObservedTimestamp: 2020-01-20 14:57:21 +0000 UTC
Timestamp: 1970-01-01 00:00:00 +0000 UTC
SeverityText: ERROR
SeverityNumber: Error(17)
Body: Str(The five boxing wizards jump quickly.)
Trace ID: 
Span ID: 
Flags: 0
LogRecord #2
ObservedTimestamp: 2020-01-20 14:57:21 +0000 UTC
Timestamp: 1970-01-01 00:00:00 +0000 UTC
SeverityText: ERROR
SeverityNumber: Error(17)
Body: Str(Hyderabad, we have a major problem.)
Trace ID: 1c849e7da1326d97451926b1b1fc15fd
Span ID: 316b290eee80d1d8
Flags: 1
        {"kind": "exporter", "data_type": "logs", "name": "logging"}

In discover
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify test-plan test-plan-ok v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants