docs/api.asciidoc in elastic-apm-0.2.0 vs docs/api.asciidoc in elastic-apm-0.3.0

- old
+ new

@@ -42,10 +42,11 @@ [[api-agent]] ==== `ElasticAPM.agent` Returns the currently running agent or nil. +[float] === Instrumentation [float] [[api-current-transaction]] ==== `ElasticAPM.current_transaction` @@ -117,10 +118,11 @@ * `rack_env`: An instance of Rack::Env Returns the built context. +[float] === Errors [float] [[api-report]] ==== `ElasticAPM.report` @@ -163,10 +165,11 @@ * `message`: A custom error string. **Required**. * `handled`: Whether the error was _handled_ eg. wasn't rescued and was represented to the user. Default: `true`. Returns `[ElasticAPM::Error]`. +[float] === Context [float] [[api-set-tag]] ==== `ElasticAPM.set_tag` @@ -205,6 +208,18 @@ Arguments: * `context`: A hash of JSON-compatible key-values. Can be nested. Returns current custom context. + +[float] +[[api-set-user]] +==== `ElasticAPM.set_user` + +Add the current user to the current transaction's context. + +Arguments: + + * `user`: An object representing the user + +Returns the given user