docs/api.asciidoc in elastic-apm-2.10.1 vs docs/api.asciidoc in elastic-apm-2.11.0
- old
+ new
@@ -28,13 +28,14 @@
----
* `config`: An optional hash or `ElasticAPM::Config` instance with configuration
options. See <<configuration,Configuration>>.
-If you are using <<getting-started-rails,Ruby on Rails>> this is done
-automatically for you.
-If not see <<getting-started-rack,Getting started with Rack>>.
+If you are using <<getting-started-rails,Ruby on Rails>> this is done automatically for you.
+If you choose not to require the `elastic_apm` gem and instead want to start the
+agent and hook into Rails manually, see <<rails-start,hooking into Rails explicitly>>.
+If you're not using Rails, see <<getting-started-rack,Getting started with Rack>>.
[float]
[[api-agent-stop]]
==== `ElasticAPM.stop`
@@ -138,11 +139,13 @@
----
Arguments:
* `name`: A name for your span. **Required**.
- * `type`: The type of work eg. `db.postgresql.query`.
+ * `type`: The type of span eg. `db`.
+ * `subtype`: The subtype of span eg. `postgresql`.
+ * `action`: The action type of span eg. `connect` or `query`.
* `context`: An instance of `Span::Context`.
* `include_stacktrace`: Whether or not to collect a Stacktrace.
* `&block`: An optional block to wrap with the span.
The block is passed the span as an optional argument.
@@ -161,11 +164,13 @@
Wraps a block in a Span.
Arguments:
* `name`: A name for your span. **Required**.
- * `type`: The type of work eg. `db.postgresql.query`.
+ * `type`: The type of span eg. `db`.
+ * `subtype`: The subtype of span eg. `postgresql`.
+ * `action`: The action type of span eg. `connect` or `query`.
* `context`: An instance of `Span::Context`.
* `include_stacktrace`: Whether or not to collect a Stacktrace.
* `&block`: An optional block to wrap with the span.
The block is passed the span as an optional argument.
@@ -183,9 +188,21 @@
* `rack_env`: An instance of Rack::Env
* `for_type`: Symbol representing type of event, eg. `:transaction` or `error`
Returns the built context.
+
+[float]
+[[rails-start]]
+=== Manually hooking into Rails
+
+Start the agent and hook into Rails explicitly. This is useful if you skip requiring
+the gem and using the `Railtie`.
+
+[source,ruby]
+----
+ElasticAPM::Rails.start(server_url: 'http://localhost:8200')
+----
[float]
=== Errors
[float]