-
Notifications
You must be signed in to change notification settings - Fork 1k
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
rename Log and Logf interface to AddEvent and AddEventf. #22
Conversation
rghetia
commented
Jun 24, 2019
- also removed log package.
- also remove log package.
api/trace/span.go
Outdated
@@ -167,12 +166,24 @@ func (sp *span) Tracer() Tracer { | |||
return sp.tracer | |||
} | |||
|
|||
func (sp *span) Log(ctx context.Context, msg string, args ...core.KeyValue) { | |||
log.With(sp).Log(ctx, msg, args...) | |||
func (sp *span) AddEvent(ctx context.Context, msg string, attributes ...core.KeyValue) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See how we solve this in Java. We have an interface called Event that can be implemented as "EventF" or as "EventString" so the main Span Interface does not have to provide all these variants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
- Event can be created using Event specific interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I will be working today on a PR to separate the API from the SDK more completely, as discussed in issue 20.
I have started to separate this morning. |
@bogdandrutu PTAL. |
) | ||
|
||
type ( | ||
event struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add that var trick that enforces this struct to implement the Event interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done