Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jpjsm opened this issue Aug 30, 2022 · 1 comment · Fixed by #2911
Closed

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

jpjsm opened this issue Aug 30, 2022 · 1 comment · Fixed by #2911
Assignees
Labels
bug Something isn't working

Comments

@jpjsm
Copy link

jpjsm commented Aug 30, 2022

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.

@jpjsm jpjsm added the bug Something isn't working label Aug 30, 2022
@jpjsm jpjsm changed the title The preferred_temporality.py sample code doesn't work The preferred_temporality.py and python preferred_aggregation.py sample code doesn't work Aug 30, 2022
@jpjsm jpjsm changed the title The preferred_temporality.py and python preferred_aggregation.py sample code doesn't work The preferred_temporality.py and preferred_aggregation.py sample code doesn't work Aug 30, 2022
@lzchen lzchen self-assigned this Aug 30, 2022
@lzchen
Copy link
Contributor

lzchen commented Aug 31, 2022

@jpjsm
Thanks for the find! The examples were not updated after this was merged, so that's why they are erroring. Created a PR to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants