Skip to content

Commit

Permalink
Add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
RonFed committed Aug 23, 2023
1 parent 15cd34c commit e4883a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ OpenTelemetry Go Automatic Instrumentation adheres to [Semantic Versioning](http
- Use UPROBE_RETURN to declare the common uprobe return logic (finding the corresponding context, setting up end time, and sending the event via perf buffer) ([#257]https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/257)
- BASE_SPAN_PROPERTIES as common fields (start time, end time, SpanContext and ParentSpanContext) for all instrumentations events (consistent between C and Go structs). ([#257]https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/257)
- Header guards in eBPF code. ([#257]https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/257)
- Re-wrtie the inject_header function to be more readable ([#266]https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/266)
- Fix bug in the net/http server instrumentation which always created a new span context ([#266]https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/266)

### Fixed

Expand Down
7 changes: 3 additions & 4 deletions pkg/instrumentors/bpf/net/http/client/bpf/probe.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static __always_inline long inject_header(void* headers_ptr, struct span_context
void *bucket_ptr = write_target_data(bucket_map_value, sizeof(struct map_bucket));
map_header.buckets = bucket_ptr;
} else {
// There is at least 1 key-value pair, hence the bucket poiner from the user is valid
// There is at least 1 key-value pair, hence the bucket pointer from the user is valid
// Read the user's bucket to the eBPF map entry
bpf_probe_read_user(bucket_map_value, sizeof(struct map_bucket), map_header.buckets);
}
Expand All @@ -96,14 +96,13 @@ static __always_inline long inject_header(void* headers_ptr, struct span_context
}

// The go string pointing to the above val
struct go_string header_value = {};
header_value.str = ptr;
header_value.len = W3C_VAL_LENGTH;
struct go_string header_value = {.len = W3C_VAL_LENGTH, .str = ptr};
ptr = write_target_data((void*)&header_value, sizeof(header_value));
if(ptr == NULL) {
return -1;
}

// Last, go_slice pointing to the above go_string
bucket_map_value->values[curr_keyvalue_count] = (struct go_slice) {.array = ptr, .cap = 1, .len = 1};

map_header.map_keyvalue_count++;
Expand Down

0 comments on commit e4883a6

Please sign in to comment.