Skip to content

in_opentelemetry: use ctraces to decode binary payload#6180

Merged
edsiper merged 1 commit intofluent:masterfrom
Syn3rman:aditya-traces-in-otel
Oct 20, 2022
Merged

in_opentelemetry: use ctraces to decode binary payload#6180
edsiper merged 1 commit intofluent:masterfrom
Syn3rman:aditya-traces-in-otel

Conversation

@Syn3rman
Copy link
Copy Markdown
Contributor

@Syn3rman Syn3rman commented Oct 11, 2022

  • Use ctraces to decode binary payload
  • add config option for raw_traces that decides whether to process or forward traces

Signed-off-by: Aditya Prajapati aditya@calyptia.com


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
[INPUT]
	name opentelemetry
	host 127.0.0.1
	port 4318
	raw_traces true

[OUTPUT]
	name stdout
	match *
  • Debug log output from testing the change
    image

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

Documentation

  • Documentation required for this feature

fluent/fluent-bit-docs#872

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@Syn3rman Syn3rman temporarily deployed to pr October 11, 2022 06:21 Inactive
@Syn3rman Syn3rman temporarily deployed to pr October 11, 2022 06:21 Inactive
@Syn3rman Syn3rman temporarily deployed to pr October 11, 2022 06:37 Inactive
if (result == 0) {
ctx->ins->event_type = FLB_INPUT_TRACES;
result = flb_input_trace_append(ctx->ins, NULL, 0, decoded_context);
// ctr_decode_opentelemetry_destroy(decoded_context);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this leading to a memory leak ? decode_context is not been destroyed

@edsiper
Copy link
Copy Markdown
Member

edsiper commented Oct 11, 2022

make sure to include a valgrind output with --leak-check=full

Signed-off-by: Aditya Prajapati <aditya@calyptia.com>
@Syn3rman Syn3rman force-pushed the aditya-traces-in-otel branch from cdf201c to b9c9cef Compare October 12, 2022 15:31
@Syn3rman Syn3rman temporarily deployed to pr October 12, 2022 15:32 Inactive
@Syn3rman Syn3rman temporarily deployed to pr October 12, 2022 15:32 Inactive
@Syn3rman
Copy link
Copy Markdown
Contributor Author

@edsiper fixed and attached valgrind output

@Syn3rman Syn3rman temporarily deployed to pr October 12, 2022 15:49 Inactive
@edsiper edsiper merged commit 101f9da into fluent:master Oct 20, 2022
mgeriesa pushed a commit to mgeriesa/fluent-bit that referenced this pull request Oct 25, 2022
Signed-off-by: Aditya Prajapati <aditya@calyptia.com>
Signed-off-by: Manal Geries <mgeriesa@gmail.com>
sumitd2 pushed a commit to sumitd2/fluent-bit that referenced this pull request Feb 8, 2023
Signed-off-by: Aditya Prajapati <aditya@calyptia.com>
Signed-off-by: root <root@sumit-acs.novalocal>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants