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

Implement reading of simple key-value Logstash JSON Marker attributes #12513

Merged
merged 7 commits into from
Nov 19, 2024

Conversation

oldium
Copy link
Contributor

@oldium oldium commented Oct 24, 2024

Supported are MapEntriesAppendingMarker and SingleFieldAppendingMarker (i.e. ObjectAppendingMarker and RawJsonAppendingMarker) only. The attribute value is always a string retrieved by a call to toString() method.

Typically the Logstash markers are added to logs via Markers.append() and Markers.appendEntries() methods.

Closes #12573

@oldium oldium requested a review from a team as a code owner October 24, 2024 13:00
Copy link

linux-foundation-easycla bot commented Oct 24, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Oct 24, 2024
@oldium oldium force-pushed the feature/logstash-markers branch 2 times, most recently from 087cdd9 to 6f0d31f Compare October 24, 2024 13:03
@oldium
Copy link
Contributor Author

oldium commented Oct 24, 2024

Ah, Muzzle, I was afraid of that. I have no idea on what is wrong.

@steverao
Copy link
Contributor

Ah, Muzzle, I was afraid of that. I have no idea on what is wrong.

About CI failing, you can refer to https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/CONTRIBUTING.md#troubleshooting-pr-build-failures

@oldium oldium force-pushed the feature/logstash-markers branch from 6f0d31f to 4129983 Compare October 24, 2024 21:38
@oldium
Copy link
Contributor Author

oldium commented Oct 24, 2024

Thanks, hopefully fixed Muzzle.

@oldium
Copy link
Contributor Author

oldium commented Oct 25, 2024

Marking as draft:

  • The new config needs to be added to the documentation (README.md in corresponding folders)
  • I will also reuse the key-value method to set numbers and I will extend it with string arrays.

I will finish this later next week.

@oldium oldium changed the title Implement reading of simple key-value Logstash JSON Marker attributes Draft: Implement reading of simple key-value Logstash JSON Marker attributes Oct 25, 2024
@trask trask marked this pull request as draft October 25, 2024 14:13
@trask
Copy link
Member

trask commented Oct 25, 2024

Marking as draft:

click the "Ready for review" button when you are ready for it to be reviewed, thanks!

@oldium oldium force-pushed the feature/logstash-markers branch from 4129983 to fa99c59 Compare October 31, 2024 22:44
@github-actions github-actions bot requested a review from theletterf October 31, 2024 22:44
@oldium oldium changed the title Draft: Implement reading of simple key-value Logstash JSON Marker attributes Implement reading of simple key-value Logstash JSON Marker attributes Oct 31, 2024
@oldium oldium marked this pull request as ready for review October 31, 2024 22:45
@oldium oldium force-pushed the feature/logstash-markers branch from fa99c59 to c4b7dd5 Compare November 1, 2024 08:56
Supported are MapEntriesAppendingMarker and SingleFieldAppendingMarker
(i.e. ObjectAppendingMarker and RawJsonAppendingMarker) only. The attribute
value is sent either as boolean, long, double or String or typed-array
with respective values. The generic types (Object[], Collection) is
converted to String array with values converted with String.valueOf()
method.

Typically the Logstash markers are added to logs via Markers.append(),
Markers.appendEntries(), Markers.appendArray() and Markers.appendRaw()
methods.

Signed-off-by: Oldřich Jedlička <[email protected]>
@oldium oldium force-pushed the feature/logstash-markers branch from c4b7dd5 to fea5c4d Compare November 1, 2024 09:17
@oldium
Copy link
Contributor Author

oldium commented Nov 1, 2024

Updated, rebased, ready for review. It looks like the build errors are unrelated (Lettuce).

@oldium
Copy link
Contributor Author

oldium commented Nov 19, 2024

Thanks for working on this, I didn't have much time recently to implement the suggestions from the review. 👍

@trask trask merged commit 5b21872 into open-telemetry:main Nov 19, 2024
56 checks passed
akats7 pushed a commit to akats7/opentelemetry-java-instrumentation that referenced this pull request Nov 21, 2024
akats7 pushed a commit to akats7/opentelemetry-java-instrumentation that referenced this pull request Nov 21, 2024
@oldium oldium deleted the feature/logstash-markers branch December 29, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test native This label can be applied to PRs to trigger them to run native tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

otel sdk unexpectedly extract log data
5 participants