|
43 | 43 | ) |
44 | 44 | print(trace.get_tracer_provider().resource.attributes) |
45 | 45 |
|
46 | | - {'telemetry.sdk.language': 'python', |
| 46 | + {'process.runtime.name': 'cpython', |
| 47 | + 'process.runtime.version': '3.8.6', |
| 48 | + 'process.runtime.description': '3.8.6 (default, Sep 30 2020, 04:00:38) [GCC 10.2.0]' |
| 49 | + 'telemetry.sdk.language': 'python', |
47 | 50 | 'telemetry.sdk.name': 'opentelemetry', |
48 | 51 | 'telemetry.sdk.version': '0.13.dev0', |
49 | 52 | 'service.name': 'shoppingcart', |
@@ -243,8 +246,17 @@ def __hash__(self): |
243 | 246 |
|
244 | 247 |
|
245 | 248 | _EMPTY_RESOURCE = Resource({}) |
| 249 | +_runtime_version = ".".join(map( |
| 250 | + str, |
| 251 | + implementation.version[:3] |
| 252 | + if implementation.version.releaselevel == "final" and not implementation.version.serial |
| 253 | + else implementation.version |
| 254 | +)) |
246 | 255 | _DEFAULT_RESOURCE = Resource( |
247 | 256 | { |
| 257 | + PROCESS_RUNTIME_NAME: implementation.name, |
| 258 | + PROCESS_RUNTIME_VERSION: _runtime_version, |
| 259 | + PROCESS_RUNTIME_DESCRIPTION: sys.version, |
248 | 260 | TELEMETRY_SDK_LANGUAGE: "python", |
249 | 261 | TELEMETRY_SDK_NAME: "opentelemetry", |
250 | 262 | TELEMETRY_SDK_VERSION: _OPENTELEMETRY_SDK_VERSION, |
|
0 commit comments