Created
October 14, 2020 07:34
-
-
Save yatender-oktalk/48044085561bcf589918a4219b10bd00 to your computer and use it in GitHub Desktop.
change-3-zipkin_random
This file contains 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
... | |
def second_event(delay) do | |
OpenTelemetry.Tracer.start_span("second_event_span") | |
# again mimicing the same stuff | |
Process.sleep(delay) | |
# use set_attributes api to add the attributes during the span | |
OpenTelemetry.Span.set_attributes([{"delay_data", delay}]) | |
OpenTelemetry.Tracer.end_span() | |
"world slept for #{delay}ms" | |
end | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment