Skip to content

Commit f310e84

Browse files
authored
Merge branch 'main' into improve_resource_detector
2 parents ce75024 + 5fffd7f commit f310e84

File tree

23 files changed

+3230
-23
lines changed

23 files changed

+3230
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
strategy:
1414
matrix:
1515
py:
16-
- { version: "3.8", tox: "38" }
1716
- { version: "3.9", tox: "39" }
1817
- { version: "3.10", tox: "310" }
1918
- { version: "3.11", tox: "311" }

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,6 @@ cython_debug/
146146
# Sphinx
147147
_build/
148148
_autosummary/
149+
150+
# Ephemeral Databases
151+
*.db

docs/contributing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ tox -e dev
5555

5656
### Running tests
5757

58-
This project supports python versions 3.5 to 3.9. To run tests, use `tox`:
58+
This project supports python versions 3.9 to 3.13. To run tests, use `tox`:
5959

6060
```sh
6161
# List all tox environments
6262
tox -l
6363

64-
# Run python3.8 exporter tests
65-
tox -e py38-ci-test-exporter
64+
# Run python3.12 exporter tests
65+
tox -e py312-ci-test-exporter
6666

67-
# Run all python3.8 tests in parallel
68-
tox -f py38-test -pauto
67+
# Run all python3.12 tests in parallel
68+
tox -f py312-test -pauto
6969

7070
# All checks that run in continuous integration use the "ci" factor, which
7171
# makes it easy to test without submitting a PR. To run all of them in

opentelemetry-exporter-gcp-logging/setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ classifiers =
1414
License :: OSI Approved :: Apache Software License
1515
Programming Language :: Python
1616
Programming Language :: Python :: 3
17-
Programming Language :: Python :: 3.8
1817
Programming Language :: Python :: 3.9
1918
Programming Language :: Python :: 3.10
2019
Programming Language :: Python :: 3.11
2120
Programming Language :: Python :: 3.12
2221

2322
[options]
24-
python_requires = >=3.8
23+
python_requires = >=3.9
2524
package_dir=
2625
=src
2726
packages=find_namespace:

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ def _convert_any_value_to_string(value: Any) -> str:
112112
return str(value)
113113
if isinstance(value, (list, tuple)):
114114
return json.dumps(value)
115-
logging.warning(
116-
"Unknown value %s found, cannot convert to string.", type(value)
117-
)
118115
return ""
119116

120117

@@ -158,7 +155,7 @@ def _set_payload_in_log_entry(log_entry: LogEntry, body: AnyValue):
158155
log_entry.json_payload = struct
159156
else:
160157
log_entry.text_payload = base64.b64encode(body).decode()
161-
else:
158+
elif body is not None:
162159
log_entry.text_payload = _convert_any_value_to_string(body)
163160

164161

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[
2+
{
3+
"entries": [
4+
{
5+
"logName": "projects/fakeproject/logs/test",
6+
"resource": {
7+
"labels": {
8+
"location": "global",
9+
"namespace": "",
10+
"node_id": ""
11+
},
12+
"type": "generic_node"
13+
},
14+
"timestamp": "2025-01-15T21:25:10.997977393Z"
15+
}
16+
],
17+
"partialSuccess": true
18+
}
19+
]

opentelemetry-exporter-gcp-logging/tests/test_cloud_logging.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,16 @@ def test_convert_non_json_dict_bytes(
155155

156156
@pytest.mark.parametrize(
157157
"body",
158-
[pytest.param("A text body", id="str"), pytest.param(True, id="bool")],
158+
[
159+
pytest.param("A text body", id="str"),
160+
pytest.param(True, id="bool"),
161+
pytest.param(None, id="None"),
162+
],
159163
)
160164
def test_convert_various_types_of_bodies(
161165
cloudloggingfake: CloudLoggingFake,
162166
snapshot_writelogentrycalls: List[WriteLogEntriesCall],
163-
body: Union[str, bool],
167+
body: Union[str, bool, None],
164168
) -> None:
165169
log_data = [
166170
LogData(

opentelemetry-exporter-gcp-monitoring/setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ classifiers =
1414
License :: OSI Approved :: Apache Software License
1515
Programming Language :: Python
1616
Programming Language :: Python :: 3
17-
Programming Language :: Python :: 3.8
1817
Programming Language :: Python :: 3.9
1918
Programming Language :: Python :: 3.10
2019
Programming Language :: Python :: 3.11
2120
Programming Language :: Python :: 3.12
2221
Programming Language :: Python :: 3.13
2322

2423
[options]
25-
python_requires = >=3.8
24+
python_requires = >=3.9
2625
package_dir=
2726
=src
2827
packages=find_namespace:

opentelemetry-exporter-gcp-trace/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ classifiers =
1414
License :: OSI Approved :: Apache Software License
1515
Programming Language :: Python
1616
Programming Language :: Python :: 3
17-
Programming Language :: Python :: 3.8
1817
Programming Language :: Python :: 3.9
1918
Programming Language :: Python :: 3.10
2019
Programming Language :: Python :: 3.11
2120
Programming Language :: Python :: 3.12
2221
Programming Language :: Python :: 3.13
2322

2423
[options]
24+
python_requires = >=3.9
2525
package_dir=
2626
=src
2727
packages=find_namespace:

opentelemetry-propagator-gcp/setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ classifiers =
1414
License :: OSI Approved :: Apache Software License
1515
Programming Language :: Python
1616
Programming Language :: Python :: 3
17-
Programming Language :: Python :: 3.8
1817
Programming Language :: Python :: 3.9
1918
Programming Language :: Python :: 3.10
2019
Programming Language :: Python :: 3.11
2120
Programming Language :: Python :: 3.12
2221
Programming Language :: Python :: 3.13
2322

2423
[options]
25-
python_requires = >=3.8
24+
python_requires = >=3.9
2625
package_dir=
2726
=src
2827
packages=find_namespace:

0 commit comments

Comments
 (0)