Skip to content

Commit ff0c82c

Browse files
authored
breaking: bump dd trace to 1.2.1 (#237)
* breaking: bump dd trace to 1.2.1 * feat: Add major version notes * fix: readme header size * fix: Fix test using old method. Describe change in changes list * fix: use tracer instead of correlation ids
1 parent bb49c80 commit ff0c82c

File tree

5 files changed

+120
-86
lines changed

5 files changed

+120
-86
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ When opening an issue, include the Datadog Lambda Library version, Python versio
2424

2525
You can also open an issue for a feature request.
2626

27+
## Major Version Notes
28+
29+
### 4.x
30+
31+
- `dd-trace` upgraded from 0.61 to 1.2, full release notes are available [here](https://ddtrace.readthedocs.io/en/stable/release_notes.html#v1-0-0)
32+
- `get_correlation_ids()` has been changed to `get_log_correlation_context()`, which now returns a dictionary containing the active `span_id`, `trace_id`, as well as `service` and `env`.
33+
2734
## Contributing
2835

2936
If you find an issue with this package and have a fix, please feel free to open a pull request following the [procedures](CONTRIBUTING.md).

datadog_lambda/tracing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def get_dd_trace_context():
427427
def set_correlation_ids():
428428
"""
429429
Create a dummy span, and overrides its trace_id and span_id, to make
430-
ddtrace.helpers.get_correlation_ids() return the correct ids for both
430+
ddtrace.helpers.get_log_correlation_context() return a dict containing the correct ids for both
431431
auto and manual log correlations.
432432
433433
TODO: Remove me when Datadog tracer is natively supported in Lambda.
@@ -453,8 +453,8 @@ def inject_correlation_ids():
453453
Override the formatter of LambdaLoggerHandler to inject datadog trace and
454454
span id for log correlation.
455455
456-
For manual injections to custom log handlers, use `ddtrace.helpers.get_correlation_ids`
457-
to retrieve correlation ids (trace_id, span_id).
456+
For manual injections to custom log handlers, use `ddtrace.helpers.get_log_correlation_context`
457+
to retrieve a dict containing correlation ids (trace_id, span_id).
458458
"""
459459
# Override the log format of the AWS provided LambdaLoggerHandler
460460
root_logger = logging.getLogger()

0 commit comments

Comments
 (0)