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

Add logging signal to main #2251

Merged
merged 17 commits into from
Nov 3, 2021
Merged

Add logging signal to main #2251

merged 17 commits into from
Nov 3, 2021

Conversation

codeboten
Copy link
Contributor

Description

The following PR adds experimental signal support for logging. Note to maintainers: please remember to not squash this change.

Part of #1890

Not marking that issue as fixed until this signal is no longer experimental.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@codeboten codeboten requested a review from a team as a code owner October 29, 2021 15:41
srikanthccv and others added 15 commits October 29, 2021 08:42
* use timeout in force_flush

* fix lint

* Update opentelemetry-sdk/src/opentelemetry/sdk/logs/export/__init__.py

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>

* fix lint

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
* Fix exception with warning message transformation

* Fix lint

* Fix lint
* Demonstrate how to set the Resource for LogEmitterProvider

Added a Resource to the logs example to make it more complete.
Previously it was using the built-in Resource. Now it adds the
service.name and service.instance.id attributes.

The resulting emitted log records look like this:
```
Resource labels:
     -> telemetry.sdk.language: STRING(python)
     -> telemetry.sdk.name: STRING(opentelemetry)
     -> telemetry.sdk.version: STRING(1.5.0)
     -> service.name: STRING(shoppingcart)
     -> service.instance.id: STRING(instance-12)
InstrumentationLibraryLogs #0
InstrumentationLibrary __main__ 0.1
LogRecord #0
Timestamp: 2021-10-14 18:33:43.425820928 +0000 UTC
Severity: ERROR
ShortName:
Body: Hyderabad, we have a major problem.
Trace ID: ce1577e4a703f42d569e72593ad71888
Span ID: f8908ac4258ceff6
Flags: 1
```

* Fix linting
* move logs to _logs

* fix lint
@lzchen lzchen added the Approve Public API check This label shows that the public symbols added or changed in a PR are strictly necessary label Oct 29, 2021
@codeboten
Copy link
Contributor Author

It appears I cannot update the branch. Looks like branch protection is preventing me from doing so. @open-telemetry/python-maintainers

@owais
Copy link
Contributor

owais commented Nov 3, 2021

I couldn't either with the following error.

image

@codeboten
Copy link
Contributor Author

@owais yeah i think you'll have to disable branch protection to be able to update the branch :(

@owais
Copy link
Contributor

owais commented Nov 3, 2021

I'm not sure which setting I need to change to remove this so I temporarily disabled it, updated and enabled again.

@owais
Copy link
Contributor

owais commented Nov 3, 2021

It looks like it should be this:

image

but I'm part of that group and should have been able to update if that was it.

@owais
Copy link
Contributor

owais commented Nov 3, 2021

BTW is this branch good to be merged? Should I enable auto-merge?

@codeboten
Copy link
Contributor Author

@owais its good to go as far as i know.

@codeboten
Copy link
Contributor Author

@lzchen @owais can this be merged?

@owais owais merged commit 7c90cf4 into main Nov 3, 2021
@aabmass
Copy link
Member

aabmass commented Nov 3, 2021

@owais @codeboten it looks like this got squashed into 7c90cf4 instead of rebase and merged?

@codeboten
Copy link
Contributor Author

doh :(

codeboten pushed a commit to codeboten/opentelemetry-python that referenced this pull request Nov 3, 2021
@codeboten
Copy link
Contributor Author

Revert change here: #2260

lzchen pushed a commit that referenced this pull request Nov 3, 2021
@lzchen lzchen deleted the logs branch November 2, 2022 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approve Public API check This label shows that the public symbols added or changed in a PR are strictly necessary
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants