Open
Conversation
Drumato
approved these changes
Mar 19, 2024
Drumato
left a comment
There was a problem hiding this comment.
いくつかコメントしたので、そちら確認したうえで現状で良さそうならLGTMです!
| func convert(src io.Reader, q int) (*bytes.Buffer, error) { | ||
| func convert(ctx context.Context, src io.Reader, q int) (*bytes.Buffer, error) { | ||
| var span trace.Span | ||
| ctx, span = tracer.Start(ctx, "convert") |
There was a problem hiding this comment.
https://go.dev/play/p/tmjSLkmiih4
Goはここらへんのシャドウイングをうまくやってくれる(片方が宣言済みで片方が新しくても、 := 演算子を使える)ので、それでもいいかもです!重箱なので無視でもOKです 🙋♀️
| ) | ||
| handleErr(err, "failed to create resource") | ||
|
|
||
| otelAgentAddr, ok := os.LookupEnv("OTEL_EXPORTER_OTLP_ENDPOINT") |
There was a problem hiding this comment.
これ明示的にやらなくても、ライブラリ内部でうまーくやってくれます!!
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenTelemetry対応を行います。全部の関数をトレースはせずに画像取得や変換処理の部分にspanを入れていきます。