Skip to content

Commit eba8551

Browse files
committed
fix mypy.. and setup constraints
1 parent 7039e2c commit eba8551

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

opentelemetry-exporter-gcp-logging/setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ package_dir=
2727
packages=find_namespace:
2828
install_requires =
2929
google-cloud-logging ~= 3.0
30-
opentelemetry-sdk ~= 1.30
31-
opentelemetry-api ~= 1.30
30+
opentelemetry-sdk ~= 1.35
31+
opentelemetry-api ~= 1.35
3232
opentelemetry-resourcedetector-gcp >= 1.5.0dev0, == 1.*
3333

3434
[options.packages.find]

opentelemetry-exporter-gcp-logging/src/opentelemetry/exporter/cloud_logging/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,9 @@ def export(self, batch: Sequence[LogData]):
198198
attributes.get(PROJECT_ID_ATTRIBUTE_KEY, self.project_id)
199199
)
200200
log_suffix = self.default_log_name
201-
if attributes.get(LOG_NAME_ATTRIBUTE_KEY):
202-
log_suffix = urllib.parse.quote_plus(
203-
attributes.get(LOG_NAME_ATTRIBUTE_KEY)
204-
)
201+
log_name_attr = attributes.get(LOG_NAME_ATTRIBUTE_KEY)
202+
if log_name_attr and isinstance(log_name_attr, str):
203+
log_suffix = urllib.parse.quote_plus(log_name_attr)
205204
elif log_record.event_name:
206205
log_suffix = urllib.parse.quote_plus(
207206
log_record.event_name.replace(".", "_")

0 commit comments

Comments
 (0)