Skip to content

Commit fb7c5ec

Browse files
authored
Merge branch 'main' into issue_3172
2 parents 955cce1 + 58e2ef0 commit fb7c5ec

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
# Otherwise, set variable to the commit of your branch on
1111
# opentelemetry-python-contrib which is compatible with these Core repo
1212
# changes.
13-
CONTRIB_REPO_SHA: 7fb0340445f5e0164bc59a3af1bf5836393013f4
13+
CONTRIB_REPO_SHA: e4d8f10ecd7bcd29c119af0e3ea7c30d4a383f4b
1414
# This is needed because we do not clone the core repo in contrib builds anymore.
1515
# When running contrib builds as part of core builds, we use actions/checkout@v2 which
1616
# does not set an environment variable (simply just runs tox), which is different when

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
- Fix suppress instrumentation for log batch processor
11+
([#3223](https://github.com/open-telemetry/opentelemetry-python/pull/3223))
12+
1013
## Version 1.17.0/0.38b0 (2023-03-22)
1114

1215
- Add experimental feature to detect resource detectors in auto instrumentation
1316
([#3181](https://github.com/open-telemetry/opentelemetry-python/pull/3181))
1417
- Implement LowMemory temporality
1518
([#3223](https://github.com/open-telemetry/opentelemetry-python/pull/3223))
16-
- PeriodicExportingMetricReader will continue if collection times out
19+
- PeriodicExportingMetricReader will continue if collection times out
1720
([#3100](https://github.com/open-telemetry/opentelemetry-python/pull/3100))
1821
- Fix formatting of ConsoleMetricExporter.
1922
([#3197](https://github.com/open-telemetry/opentelemetry-python/pull/3197))

opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
from time import time_ns
2424
from typing import IO, Callable, Deque, List, Optional, Sequence
2525

26-
from opentelemetry.context import attach, detach, set_value
26+
from opentelemetry.context import (
27+
_SUPPRESS_INSTRUMENTATION_KEY,
28+
attach,
29+
detach,
30+
set_value,
31+
)
2732
from opentelemetry.sdk._logs import LogData, LogRecord, LogRecordProcessor
2833
from opentelemetry.util._once import Once
2934

@@ -105,7 +110,7 @@ def emit(self, log_data: LogData):
105110
if self._shutdown:
106111
_logger.warning("Processor is already shutdown, ignoring call")
107112
return
108-
token = attach(set_value("suppress_instrumentation", True))
113+
token = attach(set_value(_SUPPRESS_INSTRUMENTATION_KEY, True))
109114
try:
110115
self._exporter.export((log_data,))
111116
except Exception: # pylint: disable=broad-except

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ envlist =
88
py3{7,8,9,10,11}-opentelemetry-api
99
pypy3-opentelemetry-api
1010

11-
; Test against both protobuf 3.x and 4.x
11+
; Test against both protobuf 3.x and 4.x
1212
py3{7,8,9,10,11}-proto{3,4}-opentelemetry-protobuf
1313
pypy3-proto{3,4}-opentelemetry-protobuf
1414

0 commit comments

Comments
 (0)