Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Include a simple usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
bhs committed Sep 3, 2016
1 parent 2e2cb0e commit 3af5d8d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/span.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,19 @@ export default class Span {
/**
* Add a log record to this Span, optionally at a user-provided timestamp.
*
* For example:
*
* span.log({
* size: rpc.size(), // numeric value
* URI: rpc.URI(), // string value
* payload: rpc.payload(), // Object value
* "keys can be arbitrary strings": rpc.foo(),
* });
*
* span.log({
* "error.description": error.description(), // numeric value
* }, error.timestampMillis());
*
* @param {object} keyValuePairs
* An object mapping string keys to arbitrary value types. All
* Tracer implementations should support bool, string, and numeric
Expand Down

0 comments on commit 3af5d8d

Please sign in to comment.