Skip to content

feat: Send plugin logs via OTEL#1807

Merged
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
erezrokah:feat/add_otel_logs
Jul 22, 2024
Merged

feat: Send plugin logs via OTEL#1807
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
erezrokah:feat/add_otel_logs

Conversation

@erezrokah
Copy link
Member

@erezrokah erezrokah commented Jul 19, 2024

Summary

Still WIP, opening for reference


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@github-actions github-actions bot added the feat label Jul 19, 2024
@erezrokah erezrokah force-pushed the feat/add_otel_logs branch from c214c24 to e61935f Compare July 19, 2024 20:39
@erezrokah erezrokah force-pushed the feat/add_otel_logs branch from e61935f to 95412f2 Compare July 22, 2024 14:27
record.SetSeverity(otellogSeverity(level))
record.SetBody(otellog.StringValue(message))
// See https://github.com/rs/zerolog/issues/493, this is ugly but it works
logData := make(map[string]any)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened rs/zerolog#682 let's see how that goes 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just add a general comment (not about the hack, but about what's going on with zerolog + otel? It's very clear with the context of this PR but the code looks complex so it's not clear on its own I think.

@erezrokah erezrokah marked this pull request as ready for review July 22, 2024 14:54
@erezrokah erezrokah requested review from a team and marianogappa July 22, 2024 14:54
@github-actions github-actions bot added feat and removed feat labels Jul 22, 2024
record.SetSeverity(otellogSeverity(level))
record.SetBody(otellog.StringValue(message))
// See https://github.com/rs/zerolog/issues/493, this is ugly but it works
logData := make(map[string]any)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

record.SetSeverity(otellogSeverity(level))
record.SetBody(otellog.StringValue(message))
// See https://github.com/rs/zerolog/issues/493, this is ugly but it works
logData := make(map[string]any)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just add a general comment (not about the hack, but about what's going on with zerolog + otel? It's very clear with the context of this PR but the code looks complex so it's not clear on its own I think.

@erezrokah
Copy link
Member Author

Thanks for the review, added a more detailed comment. Someone is reviewing my PR at rs/zerolog#682 but I wasn't able to understand if they are a maintainer or not.

@kodiakhq kodiakhq bot merged commit 9897b83 into cloudquery:main Jul 22, 2024
kodiakhq bot pushed a commit that referenced this pull request Jul 22, 2024
🤖 I have created a release *beep* *boop*
---


## [4.51.0](v4.50.1...v4.51.0) (2024-07-22)


### Features

* Send plugin logs via OTEL ([#1807](#1807)) ([9897b83](9897b83))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot pushed a commit to cloudquery/cloudquery that referenced this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants