Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The preferred_temporality.py and preferred_aggregation.py sample code doesn't work #2910

Closed
@jpjsm

Description

@jpjsm

Describe your environment
Environment: Microsoft Windows [Version 10.0.19042.1889]
Python: 3.10.5
PIP: 22.2.2

running locally.

Steps to reproduce

  1. From docs\examples\metrics copy the reader folder to a new location in your drive. In my case it was C:\learning\otel\reader.
  2. Create your python virtualenv. From a command prompt: virtualenv .
  3. Install requirements. From a command prompt: pip install -r requirements.txt
  4. Run the sample code. From a command prompt: python preferred_aggregation.py
  5. Run the sample code. From a command prompt: python preferred_temporality.py

What is the expected behavior?
The sample code should run and emit metrics to the console.

What is the actual behavior?

(reader) C:\learning\otel\reader>python preferred_aggregation.py
Traceback (most recent call last):
  File "C:\learning\otel\reader\preferred_aggregation.py", line 31, in <module>
    reader = PeriodicExportingMetricReader(
TypeError: PeriodicExportingMetricReader.__init__() got an unexpected keyword argument 'preferred_aggregation'

(reader) C:\learning\otel\reader>python preferred_temporality.py
Traceback (most recent call last):
  File "C:\learning\otel\reader\preferred_temporality.py", line 32, in <module>
    reader = PeriodicExportingMetricReader(
TypeError: PeriodicExportingMetricReader.__init__() got an unexpected keyword argument 'preferred_temporality'

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions