You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The instruments system.network.packets and system.network.io are created if those strings are in the config, but the callbacks look for the wrong key system.network.dropped.packets.
Steps to Reproduce
This script configures each instrument in isolation to find errors like this.
Callback failed for instrument system.network.packets.
Traceback (most recent call last):
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/opentelemetry/sdk/metrics/_internal/instrument.py", line 136, in callbackfor api_measurement in callback(callback_options):
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/opentelemetry/instrumentation/system_metrics/__init__.py", line 598, in _get_system_network_packetsfor metric inself._config["system.network.dropped.packets"]:
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^KeyError: 'system.network.dropped.packets'
Callback failed for instrument system.network.io.
Traceback (most recent call last):
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/opentelemetry/sdk/metrics/_internal/instrument.py", line 136, in callbackfor api_measurement in callback(callback_options):
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/opentelemetry/instrumentation/system_metrics/__init__.py", line 629, in _get_system_network_iofor metric inself._config["system.network.dropped.packets"]:
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^KeyError: 'system.network.dropped.packets'
Additional context
In general the architecture here seems very prone to these kinds of copy-paste mistakes.
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered:
Describe your environment
opentelemetry-instrumentation-system-metrics==0.49b1
What happened?
The instruments
system.network.packets
andsystem.network.io
are created if those strings are in the config, but the callbacks look for the wrong keysystem.network.dropped.packets
.Steps to Reproduce
This script configures each instrument in isolation to find errors like this.
Expected Result
No errors
Actual Result
Additional context
In general the architecture here seems very prone to these kinds of copy-paste mistakes.
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: