├── .gitattributes ├── .gitignore ├── .php-cs-fixer.dist.php ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── composer.json ├── docs ├── agent.md ├── breaking-changes.md ├── config.md ├── examples │ ├── agent-init.md │ ├── basic-usage.md │ ├── blob │ │ ├── dt_dashboard.png │ │ ├── kib_parent-transactions.png │ │ ├── kib_transactions.png │ │ ├── span_overview.png │ │ └── span_stacktrace.png │ ├── capture-throwable.md │ ├── convert-backtrace.md │ ├── distributed-tracing.md │ ├── metricset.php │ ├── parent-transactions.php │ ├── server-info.php │ └── spans.md ├── install.md └── knowledgebase.md ├── phpunit.xml.dist ├── schema ├── apm-6.7 │ └── docs │ │ └── spec │ │ ├── common_system.json │ │ ├── context.json │ │ ├── errors │ │ ├── common_error.json │ │ ├── v1_error.json │ │ └── v2_error.json │ │ ├── metadata.json │ │ ├── metricsets │ │ ├── common_metricset.json │ │ ├── payload.json │ │ ├── sample.json │ │ ├── v1_metricset.json │ │ └── v2_metricset.json │ │ ├── process.json │ │ ├── request.json │ │ ├── service.json │ │ ├── sourcemaps │ │ └── payload.json │ │ ├── spans │ │ ├── common_span.json │ │ ├── v1_span.json │ │ └── v2_span.json │ │ ├── stacktrace_frame.json │ │ ├── tags.json │ │ ├── timestamp_epoch.json │ │ ├── timestamp_rfc3339.json │ │ ├── transactions │ │ ├── common_transaction.json │ │ ├── mark.json │ │ ├── v1_transaction.json │ │ └── v2_transaction.json │ │ ├── user.json │ │ ├── v1_system.json │ │ └── v2_system.json ├── apm-7.6 │ └── docs │ │ └── spec │ │ ├── context.json │ │ ├── errors │ │ └── error.json │ │ ├── message.json │ │ ├── metadata.json │ │ ├── metricsets │ │ ├── metricset.json │ │ └── sample.json │ │ ├── process.json │ │ ├── request.json │ │ ├── service.json │ │ ├── sourcemaps │ │ └── payload.json │ │ ├── span_subtype.json │ │ ├── span_type.json │ │ ├── spans │ │ └── span.json │ │ ├── stacktrace_frame.json │ │ ├── system.json │ │ ├── tags.json │ │ ├── timestamp_epoch.json │ │ ├── timestamp_rfc3339.json │ │ ├── transaction_name.json │ │ ├── transaction_type.json │ │ ├── transactions │ │ ├── mark.json │ │ └── transaction.json │ │ └── user.json ├── apm-7.8 │ └── docs │ │ └── spec │ │ ├── cloud.json │ │ ├── context.json │ │ ├── errors │ │ ├── error.json │ │ └── rum_v3_error.json │ │ ├── http_response.json │ │ ├── message.json │ │ ├── metadata.json │ │ ├── metricsets │ │ ├── metricset.json │ │ ├── rum_v3_metricset.json │ │ ├── rum_v3_sample.json │ │ └── sample.json │ │ ├── process.json │ │ ├── request.json │ │ ├── rum_v3_context.json │ │ ├── rum_v3_metadata.json │ │ ├── rum_v3_service.json │ │ ├── rum_v3_stacktrace_frame.json │ │ ├── rum_v3_user.json │ │ ├── service.json │ │ ├── sourcemaps │ │ └── payload.json │ │ ├── span_subtype.json │ │ ├── span_type.json │ │ ├── spans │ │ ├── rum_v3_span.json │ │ └── span.json │ │ ├── stacktrace_frame.json │ │ ├── system.json │ │ ├── tags.json │ │ ├── timestamp_epoch.json │ │ ├── timestamp_rfc3339.json │ │ ├── transaction_name.json │ │ ├── transaction_type.json │ │ ├── transactions │ │ ├── mark.json │ │ ├── rum_v3_mark.json │ │ ├── rum_v3_transaction.json │ │ └── transaction.json │ │ └── user.json └── apm-8.3 │ └── docs │ ├── agent-server-compatibility.asciidoc │ ├── api-config.asciidoc │ ├── api-error.asciidoc │ ├── api-event-example.asciidoc │ ├── api-events.asciidoc │ ├── api-info.asciidoc │ ├── api-metadata.asciidoc │ ├── api-metricset.asciidoc │ ├── api-span.asciidoc │ ├── api-transaction.asciidoc │ ├── api.asciidoc │ ├── apm-breaking.asciidoc │ ├── apm-components.asciidoc │ ├── apm-data-security.asciidoc │ ├── apm-distributed-tracing.asciidoc │ ├── apm-input-settings.asciidoc │ ├── apm-overview.asciidoc │ ├── apm-quick-start.asciidoc │ ├── apm-rum.asciidoc │ ├── apm-tune-elasticsearch.asciidoc │ ├── aws-lambda-extension.asciidoc │ ├── common-problems.asciidoc │ ├── cross-cluster-search.asciidoc │ ├── custom-index-template.asciidoc │ ├── data-model.asciidoc │ ├── data-streams.asciidoc │ ├── features.asciidoc │ ├── guide │ └── index.asciidoc │ ├── how-to.asciidoc │ ├── ilm-how-to.asciidoc │ ├── images │ ├── agent-settings-migration.png │ ├── api-key-copy.png │ ├── apm-architecture-cloud.png │ ├── apm-architecture-diy.png │ ├── apm-architecture-two.png │ ├── apm-architecture.png │ ├── apm-distributed-tracing.png │ ├── apm-ui-api-key.png │ ├── assets.png │ ├── config-layer.png │ ├── create-component-template.png │ ├── data-flow.png │ ├── data-stream-overview.png │ ├── dt-sampling-example-1.png │ ├── dt-sampling-example-2.png │ ├── dt-sampling-example-3.png │ ├── dt-trace-ex1.png │ ├── dt-trace-ex2.png │ ├── dt-trace-ex3.png │ ├── ingest-flow.png │ ├── layers.png │ ├── scale-apm.png │ ├── schema-agent.png │ ├── server-api-key-create.png │ ├── source-map-after.png │ └── source-map-before.png │ ├── index.asciidoc │ ├── ingest-pipelines.asciidoc │ ├── input-apm.asciidoc │ ├── integrations-index.asciidoc │ ├── jaeger-integration.asciidoc │ ├── legacy │ ├── agent-configuration.asciidoc │ ├── api-keys.asciidoc │ ├── breaking-changes.asciidoc │ ├── common-problems.asciidoc │ ├── config-ownership.asciidoc │ ├── configuration-anonymous.asciidoc │ ├── configuration-process.asciidoc │ ├── configuration-rum.asciidoc │ ├── configure-kibana-endpoint.asciidoc │ ├── configuring-ingest.asciidoc │ ├── configuring-output-after.asciidoc │ ├── configuring.asciidoc │ ├── copied-from-beats │ │ ├── docs │ │ │ ├── command-reference.asciidoc │ │ │ ├── debugging.asciidoc │ │ │ ├── getting-help.asciidoc │ │ │ ├── howto │ │ │ │ └── load-index-templates.asciidoc │ │ │ ├── https.asciidoc │ │ │ ├── keystore.asciidoc │ │ │ ├── loggingconfig.asciidoc │ │ │ ├── monitoring │ │ │ │ ├── monitoring-beats.asciidoc │ │ │ │ ├── monitoring-internal-collection.asciidoc │ │ │ │ ├── monitoring-metricbeat.asciidoc │ │ │ │ └── shared-monitor-config.asciidoc │ │ │ ├── output-cloud.asciidoc │ │ │ ├── outputconfig.asciidoc │ │ │ ├── outputs-list.asciidoc │ │ │ ├── repositories.asciidoc │ │ │ ├── security │ │ │ │ └── linux-seccomp.asciidoc │ │ │ ├── shared-directory-layout.asciidoc │ │ │ ├── shared-docker.asciidoc │ │ │ ├── shared-env-vars.asciidoc │ │ │ ├── shared-instrumentation.asciidoc │ │ │ ├── shared-kerberos-config.asciidoc │ │ │ ├── shared-path-config.asciidoc │ │ │ ├── shared-securing-beat.asciidoc │ │ │ ├── shared-ssl-config.asciidoc │ │ │ ├── shared-ssl-logstash-config.asciidoc │ │ │ ├── shared-systemd.asciidoc │ │ │ └── shared │ │ │ │ └── configuring-intro.asciidoc │ │ └── outputs │ │ │ ├── codec │ │ │ └── docs │ │ │ │ └── codec.asciidoc │ │ │ ├── console │ │ │ └── docs │ │ │ │ └── console.asciidoc │ │ │ ├── elasticsearch │ │ │ └── docs │ │ │ │ └── elasticsearch.asciidoc │ │ │ ├── fileout │ │ │ └── docs │ │ │ │ └── fileout.asciidoc │ │ │ ├── kafka │ │ │ └── docs │ │ │ │ └── kafka.asciidoc │ │ │ ├── logstash │ │ │ └── docs │ │ │ │ └── logstash.asciidoc │ │ │ └── redis │ │ │ └── docs │ │ │ └── redis.asciidoc │ ├── data-ingestion.asciidoc │ ├── error-api.asciidoc │ ├── error-indices.asciidoc │ ├── events-api.asciidoc │ ├── example-intake-events.asciidoc │ ├── exploring-es-data.asciidoc │ ├── feature-roles.asciidoc │ ├── field-name-changes.asciidoc │ ├── fields.asciidoc │ ├── getting-started-apm-server.asciidoc │ ├── guide │ │ ├── apm-breaking-changes.asciidoc │ │ ├── apm-data-model.asciidoc │ │ ├── apm-doc-directory.asciidoc │ │ ├── cross-cluster-search.asciidoc │ │ ├── data-security.asciidoc │ │ ├── distributed-tracing.asciidoc │ │ ├── docker-compose.yml │ │ ├── features.asciidoc │ │ ├── images │ │ │ ├── 7.7-apm-agent-configuration.png │ │ │ ├── 7.7-apm-alert.png │ │ │ ├── 7.7-service-maps-java.png │ │ │ ├── 7.8-service-map-anomaly.png │ │ │ ├── apm-architecture-cloud.png │ │ │ ├── apm-architecture-diy.png │ │ │ ├── apm-distributed-tracing.png │ │ │ ├── apm-highlight-breakdown-charts.png │ │ │ ├── apm-highlight-rum-maps.png │ │ │ ├── apm-highlight-sample-rate.png │ │ │ ├── apm-settings-kib.png │ │ │ ├── apm-transactions-overview.png │ │ │ ├── breakdown-release-notes.png │ │ │ ├── chained-exceptions.png │ │ │ ├── dt-sampling-example.png │ │ │ ├── dt-trace-ex1.png │ │ │ ├── dt-trace-ex2.png │ │ │ ├── dt-trace-ex3.png │ │ │ ├── ecommerce-dashboard.png │ │ │ ├── geo-location.jpg │ │ │ ├── java-kafka.png │ │ │ ├── java-metadata.png │ │ │ ├── jvm-release-notes.png │ │ │ ├── kibana-geo-data.png │ │ │ ├── open-telemetry-elastic-arch.png │ │ │ ├── open-telemetry-exporter-arch.png │ │ │ ├── open-telemetry-protocol-arch.png │ │ │ ├── remote-config-release-notes.png │ │ │ ├── siem-apm-integration.png │ │ │ └── structured-filters.jpg │ │ ├── index.asciidoc │ │ ├── install-and-run.asciidoc │ │ ├── obs-integrations.asciidoc │ │ ├── opentelemetry-elastic.asciidoc │ │ ├── opentracing.asciidoc │ │ ├── overview.asciidoc │ │ ├── quick-start-overview.asciidoc │ │ ├── redirects.asciidoc │ │ ├── rum.asciidoc │ │ ├── trace-sampling.asciidoc │ │ └── troubleshooting.asciidoc │ ├── high-availability.asciidoc │ ├── howto.asciidoc │ ├── ilm.asciidoc │ ├── index.asciidoc │ ├── intake-api.asciidoc │ ├── jaeger-reference.asciidoc │ ├── jaeger-support.asciidoc │ ├── metadata-api.asciidoc │ ├── metricset-api.asciidoc │ ├── metricset-indices.asciidoc │ ├── overview.asciidoc │ ├── redirects.asciidoc │ ├── secure-communication-agents.asciidoc │ ├── security.asciidoc │ ├── server-info.asciidoc │ ├── setting-up-and-running.asciidoc │ ├── sourcemap-api.asciidoc │ ├── sourcemap-indices.asciidoc │ ├── sourcemaps.asciidoc │ ├── span-api.asciidoc │ ├── span-indices.asciidoc │ ├── ssl-input-settings.asciidoc │ ├── ssl-input.asciidoc │ ├── storage-management.asciidoc │ ├── tab-widgets │ │ ├── configure-agent-widget.asciidoc │ │ ├── configure-agent.asciidoc │ │ ├── configure-server-widget.asciidoc │ │ ├── configure-server.asciidoc │ │ ├── install-agents-widget.asciidoc │ │ ├── install-agents.asciidoc │ │ ├── jaeger-sampling-widget.asciidoc │ │ ├── jaeger-sampling.asciidoc │ │ ├── jaeger-widget.asciidoc │ │ ├── jaeger.asciidoc │ │ ├── kibana-endpoint-widget.asciidoc │ │ ├── kibana-endpoint.asciidoc │ │ ├── spin-up-stack-widget.asciidoc │ │ └── spin-up-stack.asciidoc │ ├── transaction-api.asciidoc │ ├── transaction-indices.asciidoc │ ├── transaction-metrics.asciidoc │ └── troubleshooting.asciidoc │ ├── log-correlation.asciidoc │ ├── manage-storage.asciidoc │ ├── monitor.asciidoc │ ├── notices.asciidoc │ ├── open-telemetry.asciidoc │ ├── overview.asciidoc │ ├── processing-performance.asciidoc │ ├── release-notes.asciidoc │ ├── sampling.asciidoc │ ├── secure-agent-communication.asciidoc │ ├── shared │ ├── distributed-trace-receive │ │ ├── distributed-trace-receive-widget.asciidoc │ │ └── distributed-trace-receive.asciidoc │ ├── distributed-trace-send │ │ ├── distributed-trace-send-widget.asciidoc │ │ └── distributed-trace-send.asciidoc │ ├── jaeger │ │ ├── jaeger-widget.asciidoc │ │ └── jaeger.asciidoc │ └── open-kibana │ │ ├── open-kibana-widget.asciidoc │ │ └── open-kibana.asciidoc │ ├── source-map-how-to.asciidoc │ ├── span-compression.asciidoc │ ├── spec │ ├── rumv3 │ │ ├── error.json │ │ ├── metadata.json │ │ ├── span.json │ │ └── transaction.json │ └── v2 │ │ ├── error.json │ │ ├── metadata.json │ │ ├── metricset.json │ │ ├── span.json │ │ └── transaction.json │ ├── tab-widgets │ ├── configure-agent-widget.asciidoc │ ├── configure-server-widget.asciidoc │ └── install-agents-widget.asciidoc │ ├── troubleshoot-apm.asciidoc │ ├── upgrading-to-8.x.asciidoc │ ├── upgrading-to-integration.asciidoc │ ├── upgrading.asciidoc │ └── version.asciidoc └── src ├── Agent.php ├── AgentBuilder.php ├── ApmAgent.php ├── ApmLogger.php ├── Config.php ├── Contexts └── ContextCollection.php ├── Events ├── AsyncSpan.php ├── DefaultEventFactory.php ├── DefaultSampleStrategy.php ├── Error.php ├── EventBean.php ├── EventFactoryInterface.php ├── Metadata.php ├── Metricset.php ├── Samplable.php ├── SampleStrategy.php ├── Span.php ├── TraceableEvent.php ├── Transaction.php └── TransactionSampleStrategy.php ├── Exception ├── ConfigurationException.php ├── Contexts │ └── UnsupportedContextKeyException.php ├── ElasticApmException.php ├── Events │ └── AlreadyStartedException.php ├── Helper │ └── UnsupportedConfigurationValueException.php ├── InvalidTraceContextHeaderException.php ├── MissingServiceNameException.php ├── Timer │ ├── AlreadyRunningException.php │ ├── NotStartedException.php │ └── NotStoppedException.php └── Transaction │ ├── DuplicateTransactionNameException.php │ └── UnknownTransactionException.php ├── Factory ├── ConnectorFactory.php └── TimerFactory.php ├── Helper ├── DistributedTracing.php ├── Encoding.php ├── StackTrace.php ├── Timer.php └── Timestamp.php ├── Middleware ├── Connector.php ├── Credential.php ├── CredentialApiKey.php ├── CredentialNull.php └── CredentialSecretToken.php ├── Stores ├── Store.php └── TransactionsStore.php └── Traits └── Events └── Stacktrace.php /.gitattributes: -------------------------------------------------------------------------------- 1 | /.github export-ignore 2 | /config export-ignore 3 | /phive.xml export-ignore 4 | /tests export-ignore 5 | /tools export-ignore 6 | /tools/* binary 7 | 8 | *.php diff=php -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | composer.lock 2 | vendor/ 3 | phpunit.xml 4 | composer.phar 5 | .DS_STORE 6 | .idea 7 | .phpunit.result.cache 8 | tools 9 | .php_cs.cache 10 | .php-cs-fixer.cache 11 | .phpunit.cache 12 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | in(__DIR__ . DIRECTORY_SEPARATOR . 'src') 5 | ->in(__DIR__ . DIRECTORY_SEPARATOR . 'tests') 6 | ; 7 | 8 | $config = new PhpCsFixer\Config(); 9 | $config->setRules([ 10 | '@PSR2' => true, 11 | 'array_syntax' => ['syntax' => 'short'], 12 | ]) 13 | ->setFinder($finder) 14 | ; 15 | 16 | return $config; 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) for portions of project nipwaayoni/elastic-apm-php-agent are 4 | held by philkra, 2018 as part of project philkra/elastic-apm-php-agent. All 5 | other copyright for project nipwaayoni/elastic-apm-php-agent are held by 6 | nipwaayoni, 2020. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "nipwaayoni/elastic-apm-php-agent", 3 | "description": "A php agent for Elastic APM v2 Intake API", 4 | "license": "MIT", 5 | "require" : { 6 | "php-64bit" : ">= 7.1", 7 | "psr/http-client": "^1.0", 8 | "psr/http-factory": "^1.0", 9 | "php-http/discovery": "^1.18", 10 | "ralouphie/getallheaders": "2.*|3.*", 11 | "ext-curl" : "*", 12 | "ext-json": "*" 13 | }, 14 | "require-dev": { 15 | "roave/security-advisories": "dev-master", 16 | "http-interop/http-factory-guzzle": "^1.2", 17 | "justinrainbow/json-schema": "^5.2", 18 | "psr/log": "^1.1", 19 | "php-http/guzzle7-adapter": "^1.0" 20 | }, 21 | "suggest": { 22 | "php-http/guzzle7-adapter": "PSR-18 compatible Guzzle7 adapter", 23 | "http-interop/http-factory-guzzle": "PSR-17 compatible factories for usage with PSR-18" 24 | }, 25 | "autoload" : { 26 | "psr-4" : { 27 | "Nipwaayoni\\": "src/" 28 | } 29 | }, 30 | "autoload-dev": { 31 | "psr-4": { 32 | "Nipwaayoni\\Tests\\": "tests/" 33 | } 34 | }, 35 | "config" : { 36 | "optimize-autoloader" : true, 37 | "allow-plugins": { 38 | "php-http/discovery": false 39 | } 40 | }, 41 | "authors" : [ 42 | { 43 | "name" : "Dirk Tepe", 44 | "email" : "dstepe@gmail.com", 45 | "homepage" : "https://github.com/dstepe" 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /docs/examples/agent-init.md: -------------------------------------------------------------------------------- 1 | # Initialize the Agent 2 | 3 | Note: While it is still possible to directly create an `Agent` object, this example uses the preferred `AgentBuilder` class. 4 | 5 | The `AgentBuilder` is used to set all `Agent` options and make the final `Agent` object. 6 | 7 | ```php 8 | // Minimal required usage 9 | $agent = (new \Nipwaayoni\AgentBuilder())->withConfig(new Config(['serviceName' => 'My Application']))->build(); 10 | 11 | // Setting more options 12 | $builder = new \Nipwaayoni\AgentBuilder(); 13 | $builder->withConfig(new Nipwaayoni\Config(['serviceName' => 'My Application'])); 14 | $builder->withUserContextData([ 15 | 'id' => 12345, 16 | 'email' => 'email@acme.com', 17 | ]); 18 | $builder->withCustomContextData([ 19 | // ... more key-values 20 | ]); 21 | $builder->withLabelData([ 22 | // ... more key-values 23 | ]); 24 | $agent = $builder->build(); 25 | ``` 26 | 27 | All `with` methods of the support fluent chaining, so the previous example could be written as: 28 | 29 | ```php 30 | $agent = (new \Nipwaayoni\AgentBuilder()) 31 | ->withConfig(new Nipwaayoni\Config(['serviceName' => 'My Application'])) 32 | ->withUserContextData([ 33 | 'id' => 12345, 34 | 'email' => 'email@acme.com', 35 | ]) 36 | ->withCustomContextData([ 37 | // ... more key-values 38 | ]) 39 | ->withLabelData([ 40 | // ... more key-values 41 | ]) 42 | ->build(); 43 | ``` 44 | 45 | This makes conditionally setting options easy: 46 | 47 | ```php 48 | $builder = (new \Nipwaayoni\AgentBuilder()) 49 | ->withConfig(new Nipwaayoni\Config(['serviceName' => 'My Application'])); 50 | 51 | if ($app->hasUser()) { 52 | $builder->withUserContextData([ 53 | 'id' => $app->getUserId(), 54 | 'email' => $app->getUserEmail(), 55 | ]); 56 | } 57 | 58 | $agent = $builder->build(); 59 | ``` 60 | 61 | You can also provide a customized HTTP client, for example, to disable certificate validation: 62 | 63 | ```php 64 | $agent = (new \Nipwaayoni\AgentBuilder()) 65 | ->withConfig(new Nipwaayoni\Config(['serviceName' => 'My Application'])) 66 | ->withHttpClient(new \Http\Adapter\Guzzle6\Client(new \GuzzleHttp\Client(['verify' => false]))) 67 | ->build(); 68 | ``` 69 | -------------------------------------------------------------------------------- /docs/examples/basic-usage.md: -------------------------------------------------------------------------------- 1 | # Transaction without minimal Meta data and Context 2 | ```php 3 | $transaction = $agent->startTransaction('Simple Transaction'); 4 | // Do some stuff you want to watch ... 5 | $agent->stopTransaction($transaction->getTransactionName()); 6 | ``` 7 | 8 | # Transaction with Meta data and Contexts 9 | ```php 10 | $trxName = 'Demo Transaction with more Data'; 11 | $agent->startTransaction( $trxName ); 12 | // Do some stuff you want to watch ... 13 | $agent->stopTransaction( $trxName, [ 14 | 'result' => '200', 15 | 'type' => 'demo' 16 | ] ); 17 | $agent->getTransaction( $trxName )->setUserContext( [ 18 | 'id' => 12345, 19 | 'email' => "hello@acme.com", 20 | ] ); 21 | $agent->getTransaction( $trxName )->setCustomContext( [ 22 | 'foo' => 'bar', 23 | 'bar' => [ 'foo1' => 'bar1', 'foo2' => 'bar2' ] 24 | ] ); 25 | $agent->getTransaction( $trxName )->setTags( [ 'k1' => 'v1', 'k2' => 'v2' ] ); 26 | ``` 27 | 28 | # Example of a Transaction 29 | This example illustrates how you can monitor a call to another web service. 30 | ```php 31 | $agent = (new \Nipwaayoni\AgentBuilder()) 32 | ->withConfig(new Nipwaayoni\Config(['serviceName' => 'examples'])) 33 | ->build(); 34 | 35 | $endpoint = 'https://acme.com/api/'; 36 | $payload = [ 'foo' => 'bar' ]; 37 | $client = new GuzzleHttp\Client(); 38 | 39 | // Start the Transaction 40 | $transaction = $agent->startTransaction('POST https://acme.com/api/'); 41 | 42 | // Do the call via curl/Guzzle e.g. 43 | $response = $client->request('POST', $endpoint, [ 44 | 'json' => $payload 45 | ]); 46 | 47 | // Stop the Transaction tracing, attach the Status and the sent Payload 48 | $agent->stopTransaction($transaction->getTransactionName(), [ 49 | 'status' => $response->getStatusCode(), 50 | 'payload' => $payload, 51 | ]); 52 | 53 | // The collected traces will be send to the APM server as soon as 54 | // the Agent object is destroyed. But, you can manually flush the 55 | // playload queue with $agent->send(); 56 | ``` 57 | -------------------------------------------------------------------------------- /docs/examples/blob/dt_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/docs/examples/blob/dt_dashboard.png -------------------------------------------------------------------------------- /docs/examples/blob/kib_parent-transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/docs/examples/blob/kib_parent-transactions.png -------------------------------------------------------------------------------- /docs/examples/blob/kib_transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/docs/examples/blob/kib_transactions.png -------------------------------------------------------------------------------- /docs/examples/blob/span_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/docs/examples/blob/span_overview.png -------------------------------------------------------------------------------- /docs/examples/blob/span_stacktrace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/docs/examples/blob/span_stacktrace.png -------------------------------------------------------------------------------- /docs/examples/capture-throwable.md: -------------------------------------------------------------------------------- 1 | # Capture Errors and Exceptions 2 | The agent can capture all types or errors and exceptions that are implemented from the interface [`Throwable`](http://php.net/manual/en/class.throwable.php). When capturing an _error_, you can a context and highly recommended a parent `transaction` as illustrated in the following snippet. 3 | 4 | By doing so you increase the tracability of the error. 5 | 6 | ```php 7 | // Setup Agent 8 | $config = [ 9 | 'serviceName' => 'examples', 10 | 'serviceVersion' => '1.0.0-beta', 11 | ]; 12 | 13 | $agent = (new \Nipwaayoni\AgentBuilder()) 14 | ->withConfig(new Nipwaayoni\Config($config)) 15 | ->build(); 16 | 17 | // start a new transaction or use an existing one 18 | $transaction = $agent->startTransaction('Failing-Transaction'); 19 | 20 | try { 21 | // 22 | // do stuff that generates an Exception 23 | // 24 | } 25 | catch(Exception $e) { 26 | $agent->captureThrowable($e, [], $transaction); 27 | // handle Exception .. 28 | } 29 | 30 | // do some more stuff .. 31 | $agent->stopTransaction($transaction->getTransactionName()); 32 | ``` 33 | -------------------------------------------------------------------------------- /docs/examples/convert-backtrace.md: -------------------------------------------------------------------------------- 1 | # Converting debug_backtrace to a stack trace 2 | 3 | There is a function on a span to set a stack trace but it uses a different format from PHP's `debug_backtrace()`. 4 | 5 | In order to convert between the two you can use the setDebugBacktrace function. It will convert details in the 6 | background and set the stack trace for you. 7 | 8 | A simple example would be: 9 | 10 | ```php 11 | $spanSt->setDebugBacktrace(); 12 | ``` 13 | 14 | ## Example Code 15 | ```php 16 | use Nipwaayoni\Helper\StackTrace; 17 | 18 | // create the agent 19 | $agent = (new \Nipwaayoni\AgentBuilder()) 20 | ->withConfig(new Nipwaayoni\Config(['serviceName' => 'examples'])) 21 | ->build(); 22 | 23 | // Span 24 | // start a new transaction 25 | $parent = $agent->startTransaction('POST /auth/examples/spans'); 26 | 27 | // burn some time 28 | usleep(rand(10, 25)); 29 | 30 | // Create Span 31 | $spanParent = $agent->factory()->newSpan('Authenication Workflow', $parent); 32 | // $parent->incSpanCount(); 33 | $spanParent->start(); 34 | 35 | // Create another Span that is a parent span 36 | $spanSt = $agent->factory()->newSpan('Span with stacktrace', $spanParent); 37 | // $parent->incSpanCount(); 38 | $spanSt->start(); 39 | 40 | // burn some fictive time .. 41 | usleep(rand(250, 350)); 42 | $spanSt->setDebugBacktrace(); 43 | 44 | $spanSt->stop(); 45 | $agent->putEvent($spanSt); 46 | 47 | $spanParent->stop(); 48 | 49 | // Do some stuff you want to watch ... 50 | usleep(rand(100, 250)); 51 | 52 | $agent->putEvent($spanParent); 53 | 54 | $agent->stopTransaction($parent->getTransactionName()); 55 | 56 | // Force manual flush if needed 57 | // $agent->send(); 58 | ``` 59 | 60 | -------------------------------------------------------------------------------- /docs/examples/distributed-tracing.md: -------------------------------------------------------------------------------- 1 | # Distributed Tracing 2 | 3 | Distributed tracing allows Elastic APM to associate sub-transactions from other systems which are involved in fullfilling a transaction with a primary system. For example, your web application may call multiple other systems via REST when responding to a request for a web page. Your web application transaction can record a span representing the HTTP request to a REST resource, but cannot directly know how that request is fulfilled. If the remove REST service also records application data to APM, distributed tracing allows APM to associate the two requests when you view the parent. 4 | 5 | ## Screenshots 6 | ![Dashboard](https://github.com/nipwaayoni/elastic-apm-php-agent/blob/master/docs/examples/blob/dt_dashboard.png "Distributed Tracing Dashboard") 7 | 8 | You enable distributed tracing by including a `traceparent` header containing an appropriate ID when you request another resource. Elastic APM has [adopted the W3C TraceContext](https://www.elastic.co/blog/elastic-apm-adopts-w3c-tracecontext) for this purpose. 9 | 10 | `TraceableEvent` objects (`Transaction` and `Span` objects) provide helper methods to assist in constructing the required `traceparent` header. 11 | 12 | ## Example Code 13 | ```php 14 | // Assume we have an existing transaction, and let it help us 15 | 16 | // Get a string if using something like curl 17 | $curl = curl_init(); 18 | curl_setopt_array($curl, [ 19 | CURLOPT_RETURNTRANSFER => 1, 20 | CURLOPT_URL => 'http://127.0.0.1:5001', 21 | CURLOPT_HTTPHEADER => [$transaction->traceHeaderAsString()], 22 | ]); 23 | 24 | // Or use a \Psr\Http\Message\RequestInterface compatible object 25 | $request = new \GuzzleHttp\Psr7\Request('GET', 'https://example.com'); 26 | 27 | // Get an array representation 28 | $headerParts = $transaction->traceHeaderAsArray(); 29 | $request = $request->withHeader($headerParts['name'], $headerParts['value']); 30 | 31 | // Or let the event do the work on a RequestInterface 32 | $request = $transaction->addTraceHeaderToRequest($request); 33 | ``` 34 | -------------------------------------------------------------------------------- /docs/examples/metricset.php: -------------------------------------------------------------------------------- 1 | 'examples', 14 | 'serviceVersion' => '1.0.0-beta', 15 | ]; 16 | 17 | $agent = (new \Nipwaayoni\AgentBuilder()) 18 | ->withConfig(new Nipwaayoni\Config($config)) 19 | ->build(); 20 | 21 | $agent->putEvent($agent->factory()->newMetricset([ 22 | 'system.cpu.total.norm.pct' => min(sys_getloadavg()[0]/100, 1), 23 | ])); 24 | 25 | // more Events to trace .. 26 | -------------------------------------------------------------------------------- /docs/examples/parent-transactions.php: -------------------------------------------------------------------------------- 1 | 'examples', 11 | 'serviceVersion' => '1.0.0-beta', 12 | ]; 13 | 14 | $agent = (new \Nipwaayoni\AgentBuilder()) 15 | ->withConfig(new Nipwaayoni\Config($config)) 16 | ->build(); 17 | 18 | // Start a new parent Transaction 19 | $parent = $agent->startTransaction('GET /users'); 20 | 21 | // Start a child Transaction and set the Parent 22 | $childOne = $agent->startTransaction('http.session.get.auth.data'); 23 | $childOne->setParent($parent); 24 | 25 | // Do stuff .. 26 | usleep(rand(1000, 99999)); 27 | 28 | $agent->stopTransaction($childOne->getTransactionName()); 29 | 30 | // Start another child Transaction and set the Parent 31 | $childTwo = $agent->startTransaction('elasticsearch.search.active.users'); 32 | $childTwo->setParent($parent); 33 | 34 | // Do stuff .. 35 | usleep(rand(1000, 99999)); 36 | 37 | $agent->stopTransaction($childTwo->getTransactionName()); 38 | 39 | // Create a 3rd child Transaction that is throwing an exception 40 | $childThree = $agent->startTransaction('division.by.zero'); 41 | $childThree->setParent($parent); 42 | $agent->captureThrowable( new Exception("division by 0 exception"), [], $childThree ); 43 | $agent->stopTransaction($childThree->getTransactionName()); 44 | 45 | $agent->stopTransaction($parent->getTransactionName()); 46 | 47 | // $agent->send(); 48 | -------------------------------------------------------------------------------- /docs/examples/server-info.php: -------------------------------------------------------------------------------- 1 | 'examples', 13 | 'serviceVersion' => '1.0.0-beta', 14 | ]; 15 | 16 | $agent = (new \Nipwaayoni\AgentBuilder()) 17 | ->withConfig(new Nipwaayoni\Config($config)) 18 | ->build(); 19 | 20 | $info = $agent->info(); 21 | 22 | var_dump($info->getStatusCode()); 23 | var_dump($info->getBody()->getContents()); 24 | -------------------------------------------------------------------------------- /docs/install.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | The recommended way to install the agent is through [Composer](http://getcomposer.org). 4 | 5 | Run the following composer command: 6 | 7 | ```bash 8 | composer require nipwaayoni/elastic-apm-php-agent 9 | ``` 10 | 11 | After installing, you need to require Composer's autoloader: 12 | 13 | ```php 14 | require 'vendor/autoload.php'; 15 | ``` 16 | 17 | ## HTTP ClientInterface 18 | 19 | This package uses, but does not provide, a [PSR-18 HTTP client interface](https://www.php-fig.org/psr/psr-18/) compatible implementation. Internally, the package uses [php-http/discovery](https://github.com/php-http/discovery) to find suitable PSR-17 factories and PSR-18 clients. 20 | 21 | If the package cannot find suitable PSR-17 and PSR-18 components, it will throw an`\Http\Discovery\Exception\NotFoundException` exception. 22 | 23 | If your project does not already include such an implementation, you may choose to require the following: 24 | 25 | ```bash 26 | composer require http-interop/http-factory-guzzle php-http/guzzle6-adapter 27 | ``` 28 | 29 | This installs the `php-http/guzzle6-adapter` (as PSR-18 compatible client) and `http-interop/http-factory-guzzle` (as PSR-17 compatible factories) composer packages. Once installed, auto-discovery will find and use them. If you want, you can inject your own client and factories by implementing PSR-17 and PSR-18 interfaces and passing objects using the `AgentBuilder` class. (See the [agent example](examples/agent-init.md).) 30 | 31 | Note that the PSR-18 space is still evolving and direct support without adapters could be available at any time. 32 | 33 | See all available PSR-17 factories [here](https://packagist.org/providers/psr/http-factory-implementation). 34 | 35 | See all available PSR-18 clients [here](https://packagist.org/providers/psr/http-client-implementation). 36 | 37 | -------------------------------------------------------------------------------- /docs/knowledgebase.md: -------------------------------------------------------------------------------- 1 | 2 | # Knowledgebase 3 | 4 | ## Disable Agent for CLI 5 | In case you want to disable the agent dynamically for hybrid SAPI usage, please use the following snippet. 6 | ```php 7 | 'active' => PHP_SAPI !== 'cli' 8 | ``` 9 | In case for the Laravel APM provider: 10 | ```php 11 | 'active' => PHP_SAPI !== 'cli' && env('ELASTIC_APM_ACTIVE', false) 12 | ``` 13 | Thank you to @jblotus, (https://github.com/philkra/elastic-apm-laravel/issues/19) -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | ./src/ 17 | 18 | 19 | 20 | 21 | ./tests/ 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/common_system.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/common_system.json", 3 | "title": "System", 4 | "type": ["object", "null"], 5 | "properties": { 6 | "architecture": { 7 | "description": "Architecture of the system the agent is running on.", 8 | "type": ["string", "null"], 9 | "maxLength": 1024 10 | }, 11 | "hostname": { 12 | "description": "Hostname of the system the agent is running on.", 13 | "type": ["string", "null"], 14 | "maxLength": 1024 15 | }, 16 | "platform": { 17 | "description": "Name of the system platform the agent is running on.", 18 | "type": ["string", "null"], 19 | "maxLength": 1024 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/context.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/context.json", 3 | "title": "Context", 4 | "description": "Any arbitrary contextual information regarding the event, captured by the agent, optionally provided by the user", 5 | "type": ["object", "null"], 6 | "properties": { 7 | "custom": { 8 | "description": "An arbitrary mapping of additional metadata to store with the event.", 9 | "type": ["object", "null"], 10 | "patternProperties": { 11 | "^[^.*\"]*$": {} 12 | }, 13 | "additionalProperties": false 14 | }, 15 | "response": { 16 | "type": ["object", "null"], 17 | "properties": { 18 | "finished": { 19 | "description": "A boolean indicating whether the response was finished or not", 20 | "type": ["boolean", "null"] 21 | }, 22 | "headers": { 23 | "description": "A mapping of HTTP headers of the response object", 24 | "type": ["object", "null"], 25 | "properties": { 26 | "content-type": { 27 | "type": ["string", "null"] 28 | } 29 | } 30 | }, 31 | "headers_sent": { 32 | "type": ["boolean", "null"] 33 | }, 34 | "status_code": { 35 | "description": "The HTTP status code of the response.", 36 | "type": ["integer", "null"] 37 | } 38 | } 39 | }, 40 | "request": { 41 | "$ref": "request.json" 42 | }, 43 | "tags": { 44 | "$ref": "tags.json" 45 | }, 46 | "user": { 47 | "$ref": "user.json" 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/errors/v1_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/errors/v1_error.json", 3 | "title": "Errors payload", 4 | "description": "List of errors wrapped in an object containing some other attributes normalized away from the errors themselves", 5 | "type": "object", 6 | "properties": { 7 | "service": { 8 | "$ref": "../service.json" 9 | }, 10 | "process": { 11 | "$ref": "../process.json" 12 | }, 13 | "errors": { 14 | "type": "array", 15 | "items": { 16 | "type": "object", 17 | "description": "Data captured by an agent representing an event occurring in a monitored service", 18 | "allOf": [ 19 | 20 | { "$ref": "common_error.json" }, 21 | { "$ref": "../timestamp_rfc3339.json" }, 22 | { 23 | "properties": { 24 | "id": { 25 | "type": ["string", "null"], 26 | "description": "UUID for the error", 27 | "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" 28 | }, 29 | "transaction": { 30 | "type": ["object", "null"], 31 | "description": "Data for correlating errors with transactions", 32 | "properties": { 33 | "id": { 34 | "type": ["string", "null"], 35 | "description": "UUID for the transaction", 36 | "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" 37 | } 38 | } 39 | } 40 | } 41 | } 42 | ] 43 | 44 | }, 45 | "minItems": 1 46 | }, 47 | "system": { 48 | "$ref": "../v1_system.json" 49 | } 50 | }, 51 | "required": ["service", "errors"] 52 | } 53 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/metadata.json", 3 | "title": "Metadata", 4 | "description": "Metadata concerning the other objects in the stream.", 5 | "type": ["object"], 6 | "properties": { 7 | "service": { 8 | "$ref": "service.json" 9 | }, 10 | "process": { 11 | "$ref": "process.json" 12 | }, 13 | "system": { 14 | "$ref": "v2_system.json" 15 | }, 16 | "user": { 17 | "$ref": "user.json" 18 | } 19 | }, 20 | "required": ["service"] 21 | } 22 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/metricsets/common_metricset.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "$id": "docs/spec/metricsets/common_metricset.json", 4 | "type": "object", 5 | "description": "Metric data captured by an APM agent", 6 | "properties": { 7 | "samples": { 8 | "type": ["object"], 9 | "description": "Sampled application metrics collected from the agent.", 10 | "patternProperties": { 11 | "^[^*\"]*$": { 12 | "$ref": "sample.json" 13 | } 14 | }, 15 | "additionalProperties": false 16 | }, 17 | "tags": { 18 | "$ref": "../tags.json" 19 | } 20 | }, 21 | "required": ["samples"] 22 | } 23 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/metricsets/payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "$id": "docs/spec/metricsets/payload.json", 4 | "title": "Metrics payload", 5 | "description": "Metrics for correlation with other APM data", 6 | "type": "object", 7 | "properties": { 8 | "metrics": { 9 | "type": "array", 10 | "items": { 11 | "$ref": "v1_metricset.json" 12 | }, 13 | "minItems": 1 14 | }, 15 | "process": { 16 | "$ref": "../process.json" 17 | }, 18 | "service": { 19 | "$ref": "../service.json" 20 | }, 21 | "system": { 22 | "$ref": "../v1_system.json" 23 | } 24 | }, 25 | "required": ["service", "metrics"] 26 | } 27 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/metricsets/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "$id": "docs/spec/metricsets/sample.json", 4 | "type": ["object", "null"], 5 | "description": "A single metric sample.", 6 | "properties": { 7 | "value": {"type": "number"} 8 | }, 9 | "required": ["value"] 10 | } 11 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/metricsets/v1_metricset.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/metricsets/v1_metricset.json", 3 | "type": "object", 4 | "description": "Data captured by an agent representing an event occurring in a monitored service", 5 | "allOf": [ 6 | 7 | { "$ref": "common_metricset.json" }, 8 | { "$ref": "../timestamp_rfc3339.json" }, 9 | {"required": ["timestamp"], "properties": {"timestamp": { "type": "string" }}} 10 | 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/metricsets/v2_metricset.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/metricsets/v2_metricset.json", 3 | "type": "object", 4 | "description": "Data captured by an agent representing an event occurring in a monitored service", 5 | "allOf": [ 6 | 7 | { "$ref": "common_metricset.json" }, 8 | { "$ref": "../timestamp_epoch.json"}, 9 | {"required": ["timestamp"], "properties": {"timestamp": { "type": "integer" }}} 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/process.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/process.json", 3 | "title": "Process", 4 | "type": ["object", "null"], 5 | "properties": { 6 | "pid": { 7 | "description": "Process ID of the service", 8 | "type": ["integer"] 9 | }, 10 | "ppid": { 11 | "description": "Parent process ID of the service", 12 | "type": ["integer", "null"] 13 | }, 14 | "title": { 15 | "type": ["string", "null"], 16 | "maxLength": 1024 17 | }, 18 | "argv": { 19 | "description": "Command line arguments used to start this process", 20 | "type": ["array", "null"], 21 | "minItems": 0, 22 | "items": { 23 | "type": "string" 24 | } 25 | } 26 | }, 27 | "required": ["pid"] 28 | } 29 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/sourcemaps/payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/sourcemaps/sourcemap-metadata.json", 3 | "title": "Sourcemap Metadata", 4 | "description": "Sourcemap Metadata", 5 | "type": "object", 6 | "properties": { 7 | "bundle_filepath": { 8 | "description": "relative path of the minified bundle file", 9 | "type": "string", 10 | "maxLength": 1024, 11 | "minLength": 1 12 | }, 13 | "service_version": { 14 | "description": "Version of the service emitting this event", 15 | "type": "string", 16 | "maxLength": 1024, 17 | "minLength": 1 18 | }, 19 | "service_name": { 20 | "description": "Immutable name of the service emitting this event", 21 | "type": "string", 22 | "pattern": "^[a-zA-Z0-9 _-]+$", 23 | "maxLength": 1024, 24 | "minLength": 1 25 | } 26 | }, 27 | "required": ["bundle_filepath", "service_name", "service_version"] 28 | } 29 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/spans/v1_span.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/spans/v1_span.json", 3 | "type": "object", 4 | "description": "An event captured by an agent occurring in a monitored service", 5 | "allOf": [ 6 | 7 | { "$ref": "common_span.json" }, 8 | { 9 | "properties": { 10 | "id": { 11 | "description": "ID of the span.", 12 | "type": ["integer", "null"] 13 | }, 14 | "transaction_id": { 15 | "type": "string", 16 | "description": "UUID of the enclosing transaction.", 17 | "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" 18 | }, 19 | "parent": { 20 | "type": ["integer", "null"], 21 | "description": "The ID of the parent of the span." 22 | }, 23 | "start": { 24 | "type": "number", 25 | "description": "Offset relative to the transaction's timestamp identifying the start of the span, in milliseconds." 26 | } 27 | }, 28 | "required": ["start"], 29 | "dependencies": { 30 | "parent": { 31 | "required": ["id"] 32 | } 33 | } 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/tags.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/tags.json", 3 | "title": "Tags", 4 | "type": ["object", "null"], 5 | "description": "A flat mapping of user-defined tags with string, boolean or number values.", 6 | "patternProperties": { 7 | "^[^.*\"]*$": { 8 | "type": ["string", "boolean", "number", "null"], 9 | "maxLength": 1024 10 | } 11 | }, 12 | "additionalProperties": false 13 | } 14 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/timestamp_epoch.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/timestamp_epoch.json", 3 | "title": "Timestamp Epoch", 4 | "description": "Object with 'timestamp' property.", 5 | "type": ["object"], 6 | "properties": { 7 | "timestamp": { 8 | "description": "Recorded time of the event, UTC based and formatted as microseconds since Unix epoch", 9 | "type": ["integer", "null"] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/timestamp_rfc3339.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/timestamp_rfc3339.json", 3 | "title": "Timestamp", 4 | "description": "Used for '@timestamp' property.", 5 | "type": ["object"], 6 | "properties": { 7 | "timestamp": { 8 | "type": ["string", "null"], 9 | "pattern": "Z$", 10 | "format": "date-time", 11 | "description": "Recorded time of the transaction, UTC based and formatted as YYYY-MM-DDTHH:mm:ss.sssZ" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/transactions/common_transaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transactions/common_transaction.json", 3 | "type": "object", 4 | "description": "Data captured by an agent representing an event occurring in a monitored service", 5 | "properties": { 6 | "context": { 7 | "$ref": "../context.json" 8 | }, 9 | "duration": { 10 | "type": "number", 11 | "description": "How long the transaction took to complete, in ms with 3 decimal points" 12 | }, 13 | "name": { 14 | "type": ["string","null"], 15 | "description": "Generic designation of a transaction in the scope of a single service (eg: 'GET /users/:id')", 16 | "maxLength": 1024 17 | }, 18 | "result": { 19 | "type": ["string", "null"], 20 | "description": "The result of the transaction. For HTTP-related transactions, this should be the status code formatted like 'HTTP 2xx'.", 21 | "maxLength": 1024 22 | }, 23 | "type": { 24 | "type": "string", 25 | "description": "Keyword of specific relevance in the service's domain (eg: 'request', 'backgroundjob', etc)", 26 | "maxLength": 1024 27 | }, 28 | "marks": { 29 | "type": ["object", "null"], 30 | "description": "A mark captures the timing of a significant event during the lifetime of a transaction. Marks are organized into groups and can be set by the user or the agent.", 31 | "patternProperties": { 32 | "^[^.*\"]*$": { 33 | "$ref": "mark.json" 34 | } 35 | }, 36 | "additionalProperties": false 37 | }, 38 | "sampled": { 39 | "type": ["boolean", "null"], 40 | "description": "Transactions that are 'sampled' will include all available information. Transactions that are not sampled will not have 'spans' or 'context'. Defaults to true." 41 | } 42 | }, 43 | "required": ["duration", "type"] 44 | } 45 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/transactions/mark.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transactions/mark.json", 3 | "type": ["object", "null"], 4 | "description": "A mark captures the timing in milliseconds of a significant event during the lifetime of a transaction. Every mark is a simple key value pair, where the value has to be a number, and can be set by the user or the agent.", 5 | "patternProperties": { 6 | "^[^.*\"]*$": { 7 | "type": ["number", "null"] 8 | } 9 | }, 10 | "additionalProperties": false 11 | } 12 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/transactions/v2_transaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transactions/v2_transaction.json", 3 | "type": "object", 4 | "description": "An event corresponding to an incoming request or similar task occurring in a monitored service", 5 | "allOf": [ 6 | { "$ref": "common_transaction.json" }, 7 | { "$ref": "../timestamp_epoch.json" }, 8 | { 9 | "properties": { 10 | "id": { 11 | "type": "string", 12 | "description": "Hex encoded 64 random bits ID of the transaction.", 13 | "maxLength": 1024 14 | }, 15 | "trace_id": { 16 | "description": "Hex encoded 128 random bits ID of the correlated trace.", 17 | "type": "string", 18 | "maxLength": 1024 19 | }, 20 | "parent_id": { 21 | "description": "Hex encoded 64 random bits ID of the parent transaction or span. Only root transactions of a trace do not have a parent_id, otherwise it needs to be set.", 22 | "type": ["string", "null"], 23 | "maxLength": 1024 24 | }, 25 | "span_count": { 26 | "type": "object", 27 | "properties": { 28 | "started": { 29 | "type": "integer", 30 | "description": "Number of correlated spans that are recorded." 31 | 32 | }, 33 | "dropped": { 34 | "type": ["integer","null"], 35 | "description": "Number of spans that have been dropped by the agent recording the transaction." 36 | 37 | } 38 | }, 39 | "required": ["started"] 40 | } 41 | }, 42 | "required": ["id", "trace_id", "span_count"] 43 | } 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/user.json", 3 | "title": "User", 4 | "description": "Describes the authenticated User for a request.", 5 | "type": ["object", "null"], 6 | "properties": { 7 | "id": { 8 | "description": "Identifier of the logged in user, e.g. the primary key of the user", 9 | "type": ["string", "integer", "null"], 10 | "maxLength": 1024 11 | }, 12 | "email": { 13 | "description": "Email of the logged in user", 14 | "type": ["string", "null"], 15 | "maxLength": 1024 16 | }, 17 | "username": { 18 | "description": "The username of the logged in user", 19 | "type": ["string", "null"], 20 | "maxLength": 1024 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/v1_system.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/v1_system.json", 3 | "title": "System", 4 | "type": ["object", "null"], 5 | "allOf": [ 6 | { "$ref": "common_system.json" } 7 | ] 8 | } -------------------------------------------------------------------------------- /schema/apm-6.7/docs/spec/v2_system.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/v2_system.json", 3 | "title": "System", 4 | "type": ["object", "null"], 5 | "allOf": [ 6 | { "$ref": "common_system.json" }, 7 | { 8 | "properties": { 9 | "kubernetes": { 10 | "properties": { 11 | "namespace": { 12 | "description": "Kubernetes namespace", 13 | "type": ["string", "null"], 14 | "maxLength": 1024 15 | }, 16 | "pod":{ 17 | "properties": { 18 | "name": { 19 | "description": "Kubernetes pod name", 20 | "type": ["string", "null"], 21 | "maxLength": 1024 22 | }, 23 | "uid": { 24 | "description": "Kubernetes pod uid", 25 | "type": ["string", "null"], 26 | "maxLength": 1024 27 | } 28 | } 29 | }, 30 | "node":{ 31 | "properties": { 32 | "name": { 33 | "description": "Kubernetes node name", 34 | "type": ["string", "null"], 35 | "maxLength": 1024 36 | } 37 | } 38 | } 39 | } 40 | }, 41 | "container": { 42 | "properties": { 43 | "id" : { 44 | "description": "Container ID", 45 | "type": ["string"], 46 | "maxLength": 1024 47 | } 48 | }, 49 | "required": ["id"] 50 | } 51 | } 52 | } 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/message.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/message.json", 3 | "title": "Message", 4 | "description": "Details related to message receiving and publishing if the captured event integrates with a messaging system", 5 | "type": ["object", "null"], 6 | "properties": { 7 | "queue": { 8 | "type": ["object", "null"], 9 | "properties": { 10 | "name": { 11 | "description": "Name of the message queue where the message is received.", 12 | "type": ["string","null"], 13 | "maxLength": 1024 14 | } 15 | } 16 | }, 17 | "age": { 18 | "type": ["object", "null"], 19 | "properties": { 20 | "ms": { 21 | "description": "The age of the message in milliseconds. If the instrumented messaging framework provides a timestamp for the message, agents may use it. Otherwise, the sending agent can add a timestamp in milliseconds since the Unix epoch to the message's metadata to be retrieved by the receiving agent. If a timestamp is not available, agents should omit this field.", 22 | "type": ["integer", "null"] 23 | } 24 | } 25 | }, 26 | "body": { 27 | "description": "messsage body, similar to an http request body", 28 | "type": ["string", "null"] 29 | }, 30 | "headers": { 31 | "description": "messsage headers, similar to http request headers", 32 | "type": ["object", "null"], 33 | "patternProperties": { 34 | "[.*]*$": { 35 | "type": ["string", "array", "null"], 36 | "items": { 37 | "type": ["string"] 38 | } 39 | } 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/metadata.json", 3 | "title": "Metadata", 4 | "description": "Metadata concerning the other objects in the stream.", 5 | "type": ["object"], 6 | "properties": { 7 | "service": { 8 | "$ref": "service.json", 9 | "type": "object", 10 | "required": ["name", "agent"], 11 | "properties.name.type": "string", 12 | "properties.agent.type": "string", 13 | "properties.agent.required": ["name", "version"], 14 | "properties.agent.properties.name.type": "string", 15 | "properties.agent.properties.version.type": "string", 16 | "properties.runtime.required": ["name", "version"], 17 | "properties.runtime.properties.name.type": "string", 18 | "properties.runtime.properties.version.type": "string", 19 | "properties.language.required": ["name"], 20 | "properties.language.properties.name.type": "string" 21 | }, 22 | "process": { 23 | "$ref": "process.json" 24 | }, 25 | "system": { 26 | "$ref": "system.json" 27 | }, 28 | "user": { 29 | "description": "Describes the authenticated User for a request.", 30 | "$ref": "user.json" 31 | }, 32 | "labels": { 33 | "$ref": "tags.json" 34 | } 35 | }, 36 | "required": ["service"] 37 | } 38 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/metricsets/metricset.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/metricsets/metricset.json", 3 | "type": "object", 4 | "description": "Data captured by an agent representing an event occurring in a monitored service", 5 | "allOf": [ 6 | { "$ref": "../timestamp_epoch.json"}, 7 | { "$ref": "../span_type.json" }, 8 | { "$ref": "../span_subtype.json" }, 9 | { "$ref": "../transaction_name.json" }, 10 | { "$ref": "../transaction_type.json" }, 11 | { 12 | "properties": { 13 | "samples": { 14 | "type": [ 15 | "object" 16 | ], 17 | "description": "Sampled application metrics collected from the agent.", 18 | "patternProperties": { 19 | "^[^*\"]*$": { 20 | "$ref": "sample.json" 21 | } 22 | }, 23 | "additionalProperties": false 24 | }, 25 | "tags": { 26 | "$ref": "../tags.json" 27 | } 28 | }, 29 | "required": ["samples"] 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/metricsets/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "$id": "docs/spec/metricsets/sample.json", 4 | "type": ["object", "null"], 5 | "description": "A single metric sample.", 6 | "properties": { 7 | "value": {"type": "number"} 8 | }, 9 | "required": ["value"] 10 | } 11 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/process.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/process.json", 3 | "title": "Process", 4 | "type": ["object", "null"], 5 | "properties": { 6 | "pid": { 7 | "description": "Process ID of the service", 8 | "type": ["integer"] 9 | }, 10 | "ppid": { 11 | "description": "Parent process ID of the service", 12 | "type": ["integer", "null"] 13 | }, 14 | "title": { 15 | "type": ["string", "null"], 16 | "maxLength": 1024 17 | }, 18 | "argv": { 19 | "description": "Command line arguments used to start this process", 20 | "type": ["array", "null"], 21 | "minItems": 0, 22 | "items": { 23 | "type": "string" 24 | } 25 | } 26 | }, 27 | "required": ["pid"] 28 | } 29 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/sourcemaps/payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/sourcemaps/sourcemap-metadata.json", 3 | "title": "Sourcemap Metadata", 4 | "description": "Sourcemap Metadata", 5 | "type": "object", 6 | "properties": { 7 | "bundle_filepath": { 8 | "description": "relative path of the minified bundle file", 9 | "type": "string", 10 | "maxLength": 1024, 11 | "minLength": 1 12 | }, 13 | "service_version": { 14 | "description": "Version of the service emitting this event", 15 | "type": "string", 16 | "maxLength": 1024, 17 | "minLength": 1 18 | }, 19 | "service_name": { 20 | "description": "Immutable name of the service emitting this event", 21 | "type": "string", 22 | "pattern": "^[a-zA-Z0-9 _-]+$", 23 | "maxLength": 1024, 24 | "minLength": 1 25 | } 26 | }, 27 | "required": ["bundle_filepath", "service_name", "service_version"] 28 | } 29 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/span_subtype.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/span_subtype.json", 3 | "title": "Span Subtype", 4 | "type": ["object"], 5 | "properties": { 6 | "subtype": { 7 | "type": ["string", "null"], 8 | "description": "A further sub-division of the type (e.g. postgresql, elasticsearch)", 9 | "maxLength": 1024 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/span_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/span_type.json", 3 | "title": "Span Type", 4 | "type": ["object"], 5 | "properties": { 6 | "type": { 7 | "type": "string", 8 | "description": "Keyword of specific relevance in the service's domain (eg: 'db.postgresql.query', 'template.erb', etc)", 9 | "maxLength": 1024 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/tags.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/tags.json", 3 | "title": "Tags", 4 | "type": ["object", "null"], 5 | "description": "A flat mapping of user-defined tags with string, boolean or number values.", 6 | "patternProperties": { 7 | "^[^.*\"]*$": { 8 | "type": ["string", "boolean", "number", "null"], 9 | "maxLength": 1024 10 | } 11 | }, 12 | "additionalProperties": false 13 | } 14 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/timestamp_epoch.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/timestamp_epoch.json", 3 | "title": "Timestamp Epoch", 4 | "description": "Object with 'timestamp' property.", 5 | "type": ["object"], 6 | "properties": { 7 | "timestamp": { 8 | "description": "Recorded time of the event, UTC based and formatted as microseconds since Unix epoch", 9 | "type": ["integer", "null"] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/timestamp_rfc3339.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "doc/spec/timestamp_rfc3339.json", 3 | "title": "Timestamp", 4 | "description": "Used for '@timestamp' property.", 5 | "type": ["object"], 6 | "properties": { 7 | "timestamp": { 8 | "type": ["string", "null"], 9 | "pattern": "Z$", 10 | "format": "date-time", 11 | "description": "Recorded time of the transaction, UTC based and formatted as YYYY-MM-DDTHH:mm:ss.sssZ" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/transaction_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transaction_name.json", 3 | "title": "Transaction Name", 4 | "type": ["object"], 5 | "properties": { 6 | "name": { 7 | "type": ["string","null"], 8 | "description": "Generic designation of a transaction in the scope of a single service (eg: 'GET /users/:id')", 9 | "maxLength": 1024 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/transaction_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transaction_type.json", 3 | "title": "Transaction Type", 4 | "type": ["object"], 5 | "properties": { 6 | "type": { 7 | "type": "string", 8 | "description": "Keyword of specific relevance in the service's domain (eg: 'request', 'backgroundjob', etc)", 9 | "maxLength": 1024 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/transactions/mark.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transactions/mark.json", 3 | "type": ["object", "null"], 4 | "description": "A mark captures the timing in milliseconds of a significant event during the lifetime of a transaction. Every mark is a simple key value pair, where the value has to be a number, and can be set by the user or the agent.", 5 | "patternProperties": { 6 | "^[^.*\"]*$": { 7 | "type": ["number", "null"] 8 | } 9 | }, 10 | "additionalProperties": false 11 | } 12 | -------------------------------------------------------------------------------- /schema/apm-7.6/docs/spec/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/user.json", 3 | "title": "User", 4 | "type": ["object", "null"], 5 | "properties": { 6 | "id": { 7 | "description": "Identifier of the logged in user, e.g. the primary key of the user", 8 | "type": ["string", "integer", "null"], 9 | "maxLength": 1024 10 | }, 11 | "email": { 12 | "description": "Email of the logged in user", 13 | "type": ["string", "null"], 14 | "maxLength": 1024 15 | }, 16 | "username": { 17 | "description": "The username of the logged in user", 18 | "type": ["string", "null"], 19 | "maxLength": 1024 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/http_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/http_response.json", 3 | "title": "HTTP response object", 4 | "description": "HTTP response object, used by error, span and transction documents", 5 | "type": ["object", "null"], 6 | "properties": { 7 | "status_code": { 8 | "type": ["integer", "null"], 9 | "description": "The status code of the http request." 10 | }, 11 | "transfer_size": { 12 | "type": ["number", "null"], 13 | "description": "Total size of the payload." 14 | }, 15 | "encoded_body_size": { 16 | "type": ["number", "null"], 17 | "description": "The encoded size of the payload." 18 | }, 19 | "decoded_body_size": { 20 | "type": ["number", "null"], 21 | "description": "The decoded size of the payload." 22 | }, 23 | "headers": { 24 | "type": ["object", "null"], 25 | "patternProperties": { 26 | "[.*]*$": { 27 | "type": ["string", "array", "null"], 28 | "items": { 29 | "type": ["string"] 30 | } 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/message.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/message.json", 3 | "title": "Message", 4 | "description": "Details related to message receiving and publishing if the captured event integrates with a messaging system", 5 | "type": ["object", "null"], 6 | "properties": { 7 | "queue": { 8 | "type": ["object", "null"], 9 | "properties": { 10 | "name": { 11 | "description": "Name of the message queue where the message is received.", 12 | "type": ["string","null"], 13 | "maxLength": 1024 14 | } 15 | } 16 | }, 17 | "age": { 18 | "type": ["object", "null"], 19 | "properties": { 20 | "ms": { 21 | "description": "The age of the message in milliseconds. If the instrumented messaging framework provides a timestamp for the message, agents may use it. Otherwise, the sending agent can add a timestamp in milliseconds since the Unix epoch to the message's metadata to be retrieved by the receiving agent. If a timestamp is not available, agents should omit this field.", 22 | "type": ["integer", "null"] 23 | } 24 | } 25 | }, 26 | "body": { 27 | "description": "messsage body, similar to an http request body", 28 | "type": ["string", "null"] 29 | }, 30 | "headers": { 31 | "description": "messsage headers, similar to http request headers", 32 | "type": ["object", "null"], 33 | "patternProperties": { 34 | "[.*]*$": { 35 | "type": ["string", "array", "null"], 36 | "items": { 37 | "type": ["string"] 38 | } 39 | } 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/metadata.json", 3 | "title": "Metadata", 4 | "description": "Metadata concerning the other objects in the stream.", 5 | "type": ["object"], 6 | "properties": { 7 | "service": { 8 | "$ref": "service.json", 9 | "type": "object", 10 | "required": ["name", "agent"], 11 | "properties.name.type": "string", 12 | "properties.agent.type": "string", 13 | "properties.agent.required": ["name", "version"], 14 | "properties.agent.properties.name.type": "string", 15 | "properties.agent.properties.version.type": "string", 16 | "properties.runtime.required": ["name", "version"], 17 | "properties.runtime.properties.name.type": "string", 18 | "properties.runtime.properties.version.type": "string", 19 | "properties.language.required": ["name"], 20 | "properties.language.properties.name.type": "string" 21 | }, 22 | "process": { 23 | "$ref": "process.json" 24 | }, 25 | "system": { 26 | "$ref": "system.json" 27 | }, 28 | "user": { 29 | "description": "Describes the authenticated User for a request.", 30 | "$ref": "user.json" 31 | }, 32 | "cloud": { 33 | "$ref": "cloud.json" 34 | }, 35 | "labels": { 36 | "$ref": "tags.json" 37 | } 38 | }, 39 | "required": ["service"] 40 | } 41 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/metricsets/metricset.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/metricsets/metricset.json", 3 | "type": "object", 4 | "description": "Data captured by an agent representing an event occurring in a monitored service", 5 | "allOf": [ 6 | { "$ref": "../timestamp_epoch.json"}, 7 | { "$ref": "../span_type.json" }, 8 | { "$ref": "../span_subtype.json" }, 9 | { "$ref": "../transaction_name.json" }, 10 | { "$ref": "../transaction_type.json" }, 11 | { 12 | "properties": { 13 | "samples": { 14 | "type": [ 15 | "object" 16 | ], 17 | "description": "Sampled application metrics collected from the agent.", 18 | "patternProperties": { 19 | "^[^*\"]*$": { 20 | "$ref": "sample.json" 21 | } 22 | }, 23 | "additionalProperties": false 24 | }, 25 | "tags": { 26 | "$ref": "../tags.json" 27 | } 28 | }, 29 | "required": ["samples"] 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/metricsets/rum_v3_metricset.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/metricsets/rum_v3_metricset.json", 3 | "description": "Data captured by an agent representing an event occurring in a monitored service", 4 | "properties": { 5 | "y": { 6 | "type": ["object", "null"], 7 | "description": "span", 8 | "properties": { 9 | "t": { 10 | "type": "string", 11 | "description": "type", 12 | "maxLength": 1024 13 | }, 14 | "su": { 15 | "type": ["string", "null"], 16 | "description": "subtype", 17 | "maxLength": 1024 18 | } 19 | } 20 | }, 21 | "sa": { 22 | "type": "object", 23 | "description": "Sampled application metrics collected from the agent.", 24 | "properties": { 25 | "xdc": { 26 | "description": "transaction.duration.count", 27 | "$ref": "rum_v3_sample.json" 28 | }, 29 | "xds": { 30 | "description": "transaction.duration.sum.us", 31 | "$ref": "rum_v3_sample.json" 32 | }, 33 | "xbc": { 34 | "description": "transaction.breakdown.count", 35 | "$ref": "rum_v3_sample.json" 36 | }, 37 | "ysc": { 38 | "description": "span.self_time.count", 39 | "$ref": "rum_v3_sample.json" 40 | }, 41 | "yss": { 42 | "description": "span.self_time.sum.us", 43 | "$ref": "rum_v3_sample.json" 44 | } 45 | } 46 | }, 47 | "tags": { 48 | "$ref": "../tags.json" 49 | } 50 | }, 51 | "required": ["sa"] 52 | } 53 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/metricsets/rum_v3_sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "$id": "docs/spec/metricsets/rum_v3_sample.json", 4 | "type": ["object", "null"], 5 | "description": "A single metric sample.", 6 | "properties": { 7 | "v": {"type": "number"} 8 | }, 9 | "required": ["v"] 10 | } 11 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/metricsets/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "$id": "docs/spec/metricsets/sample.json", 4 | "type": ["object", "null"], 5 | "description": "A single metric sample.", 6 | "properties": { 7 | "value": {"type": "number"} 8 | }, 9 | "required": ["value"] 10 | } 11 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/process.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/process.json", 3 | "title": "Process", 4 | "type": ["object", "null"], 5 | "properties": { 6 | "pid": { 7 | "description": "Process ID of the service", 8 | "type": ["integer"] 9 | }, 10 | "ppid": { 11 | "description": "Parent process ID of the service", 12 | "type": ["integer", "null"] 13 | }, 14 | "title": { 15 | "type": ["string", "null"], 16 | "maxLength": 1024 17 | }, 18 | "argv": { 19 | "description": "Command line arguments used to start this process", 20 | "type": ["array", "null"], 21 | "minItems": 0, 22 | "items": { 23 | "type": "string" 24 | } 25 | } 26 | }, 27 | "required": ["pid"] 28 | } 29 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/rum_v3_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/rum_v3_metadata.json", 3 | "title": "Metadata", 4 | "description": "Metadata concerning the other objects in the stream.", 5 | "type": [ 6 | "object" 7 | ], 8 | "properties": { 9 | "se": { 10 | "$ref": "rum_v3_service.json", 11 | "type": "object", 12 | "required": [ 13 | "n", 14 | "a" 15 | ], 16 | "properties.n.type": "string", 17 | "properties.a.type": "string", 18 | "properties.a.required": [ 19 | "n", 20 | "ve" 21 | ], 22 | "properties.a.properties.n.type": "string", 23 | "properties.a.properties.ve.type": "string", 24 | "properties.ru.required": [ 25 | "n", 26 | "ve" 27 | ], 28 | "properties.ru.properties.n.type": "string", 29 | "properties.ru.properties.ve.type": "string", 30 | "properties.la.required": [ 31 | "n" 32 | ], 33 | "properties.la.properties.n.type": "string" 34 | }, 35 | "u": { 36 | "$ref": "rum_v3_user.json" 37 | }, 38 | "l": { 39 | "$ref": "tags.json" 40 | } 41 | }, 42 | "required": [ 43 | "se" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/rum_v3_user.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/rum_v3_user.json", 3 | "title": "User", 4 | "type": [ 5 | "object", 6 | "null" 7 | ], 8 | "properties": { 9 | "id": { 10 | "description": "Identifier of the logged in user, e.g. the primary key of the user", 11 | "type": [ 12 | "string", 13 | "integer", 14 | "null" 15 | ], 16 | "maxLength": 1024 17 | }, 18 | "em": { 19 | "description": "Email of the logged in user", 20 | "type": [ 21 | "string", 22 | "null" 23 | ], 24 | "maxLength": 1024 25 | }, 26 | "un": { 27 | "description": "The username of the logged in user", 28 | "type": [ 29 | "string", 30 | "null" 31 | ], 32 | "maxLength": 1024 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/sourcemaps/payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/sourcemaps/sourcemap-metadata.json", 3 | "title": "Sourcemap Metadata", 4 | "description": "Sourcemap Metadata", 5 | "type": "object", 6 | "properties": { 7 | "bundle_filepath": { 8 | "description": "relative path of the minified bundle file", 9 | "type": "string", 10 | "maxLength": 1024, 11 | "minLength": 1 12 | }, 13 | "service_version": { 14 | "description": "Version of the service emitting this event", 15 | "type": "string", 16 | "maxLength": 1024, 17 | "minLength": 1 18 | }, 19 | "service_name": { 20 | "description": "Immutable name of the service emitting this event", 21 | "type": "string", 22 | "pattern": "^[a-zA-Z0-9 _-]+$", 23 | "maxLength": 1024, 24 | "minLength": 1 25 | } 26 | }, 27 | "required": ["bundle_filepath", "service_name", "service_version"] 28 | } 29 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/span_subtype.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/span_subtype.json", 3 | "title": "Span Subtype", 4 | "type": ["object"], 5 | "properties": { 6 | "subtype": { 7 | "type": ["string", "null"], 8 | "description": "A further sub-division of the type (e.g. postgresql, elasticsearch)", 9 | "maxLength": 1024 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/span_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/span_type.json", 3 | "title": "Span Type", 4 | "type": ["object"], 5 | "properties": { 6 | "type": { 7 | "type": "string", 8 | "description": "Keyword of specific relevance in the service's domain (eg: 'db.postgresql.query', 'template.erb', etc)", 9 | "maxLength": 1024 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/tags.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/tags.json", 3 | "title": "Tags", 4 | "type": ["object", "null"], 5 | "description": "A flat mapping of user-defined tags with string, boolean or number values.", 6 | "patternProperties": { 7 | "^[^.*\"]*$": { 8 | "type": ["string", "boolean", "number", "null"], 9 | "maxLength": 1024 10 | } 11 | }, 12 | "additionalProperties": false 13 | } 14 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/timestamp_epoch.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/timestamp_epoch.json", 3 | "title": "Timestamp Epoch", 4 | "description": "Object with 'timestamp' property.", 5 | "type": ["object"], 6 | "properties": { 7 | "timestamp": { 8 | "description": "Recorded time of the event, UTC based and formatted as microseconds since Unix epoch", 9 | "type": ["integer", "null"] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/timestamp_rfc3339.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/timestamp_rfc3339.json", 3 | "title": "Timestamp", 4 | "description": "Used for '@timestamp' property.", 5 | "type": ["object"], 6 | "properties": { 7 | "timestamp": { 8 | "type": ["string", "null"], 9 | "pattern": "Z$", 10 | "format": "date-time", 11 | "description": "Recorded time of the transaction, UTC based and formatted as YYYY-MM-DDTHH:mm:ss.sssZ" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/transaction_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transaction_name.json", 3 | "title": "Transaction Name", 4 | "type": ["object"], 5 | "properties": { 6 | "name": { 7 | "type": ["string","null"], 8 | "description": "Generic designation of a transaction in the scope of a single service (eg: 'GET /users/:id')", 9 | "maxLength": 1024 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/transaction_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transaction_type.json", 3 | "title": "Transaction Type", 4 | "type": ["object"], 5 | "properties": { 6 | "type": { 7 | "type": "string", 8 | "description": "Keyword of specific relevance in the service's domain (eg: 'request', 'backgroundjob', etc)", 9 | "maxLength": 1024 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/transactions/mark.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/transactions/mark.json", 3 | "type": ["object", "null"], 4 | "description": "A mark captures the timing in milliseconds of a significant event during the lifetime of a transaction. Every mark is a simple key value pair, where the value has to be a number, and can be set by the user or the agent.", 5 | "patternProperties": { 6 | "^[^.*\"]*$": { 7 | "type": ["number", "null"] 8 | } 9 | }, 10 | "additionalProperties": false 11 | } 12 | -------------------------------------------------------------------------------- /schema/apm-7.8/docs/spec/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "docs/spec/user.json", 3 | "title": "User", 4 | "type": ["object", "null"], 5 | "properties": { 6 | "id": { 7 | "description": "Identifier of the logged in user, e.g. the primary key of the user", 8 | "type": ["string", "integer", "null"], 9 | "maxLength": 1024 10 | }, 11 | "email": { 12 | "description": "Email of the logged in user", 13 | "type": ["string", "null"], 14 | "maxLength": 1024 15 | }, 16 | "username": { 17 | "description": "The username of the logged in user", 18 | "type": ["string", "null"], 19 | "maxLength": 1024 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/agent-server-compatibility.asciidoc: -------------------------------------------------------------------------------- 1 | [[agent-server-compatibility]] 2 | === {apm-agent} compatibility 3 | 4 | The chart below outlines the compatibility between different versions of the APM agents and the APM integration/server. 5 | 6 | [options="header"] 7 | |==== 8 | |Language |{apm-agent} version |APM integration/server version 9 | // Go 10 | .1+|**Go agent** 11 | |`1.x` |≥ `6.5` 12 | 13 | // iOS 14 | .1+|**iOS agent** 15 | |`0.x` |≥ `7.14` 16 | 17 | // Java 18 | .1+|**Java agent** 19 | |`1.x`|≥ `6.5` 20 | 21 | // .NET 22 | .1+|**.NET agent** 23 | |`1.x` |≥ `6.5` 24 | 25 | // Node 26 | .1+|**Node.js agent** 27 | |`3.x` |≥ `6.6` 28 | 29 | // PHP 30 | .1+|**PHP agent** 31 | |`1.x` |≥ `7.0` 32 | 33 | // Python 34 | .1+|**Python agent** 35 | |`6.x` |≥ `6.6` 36 | 37 | // Ruby 38 | .2+|**Ruby agent** 39 | |`3.x` |≥ `6.5` 40 | |`4.x` |≥ `6.5` 41 | 42 | // RUM 43 | .2+|**JavaScript RUM agent** 44 | |`4.x` |≥ `6.5` 45 | |`5.x` |≥ `7.0` 46 | |==== 47 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/api-error.asciidoc: -------------------------------------------------------------------------------- 1 | [[api-error]] 2 | ==== Errors 3 | 4 | An error or a logged error message captured by an agent occurring in a monitored service. 5 | 6 | [float] 7 | [[api-error-schema]] 8 | ==== Error Schema 9 | 10 | APM Server uses JSON Schema to validate requests. The specification for errors is defined on 11 | {github_repo_link}/docs/spec/v2/error.json[GitHub] and included below: 12 | 13 | [source,json] 14 | ---- 15 | include::./spec/v2/error.json[] 16 | ---- 17 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/api-event-example.asciidoc: -------------------------------------------------------------------------------- 1 | [[api-event-example]] 2 | ==== Example request body 3 | 4 | A request body example containing one event for all currently supported event types. 5 | 6 | [source,json] 7 | ---- 8 | include::./data/intake-api/generated/events.ndjson[] 9 | ---- 10 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/api-info.asciidoc: -------------------------------------------------------------------------------- 1 | [[api-info]] 2 | === Server information API 3 | 4 | The APM Server exposes an API endpoint to query general server information. 5 | This lightweight endpoint is useful as a server up/down health check. 6 | 7 | [float] 8 | [[api-info-endpoint]] 9 | === Server Information endpoint 10 | 11 | Send an `HTTP GET` request to the server information endpoint: 12 | 13 | [source,bash] 14 | ------------------------------------------------------------ 15 | http(s)://{hostname}:{port}/ 16 | ------------------------------------------------------------ 17 | 18 | This endpoint always returns an HTTP 200. 19 | 20 | If <> or a <> is configured, requests to this endpoint must be authenticated. 21 | 22 | [float] 23 | [[api-info-examples]] 24 | ==== Example 25 | 26 | Example APM Server information request: 27 | 28 | ["source","sh",subs="attributes"] 29 | --------------------------------------------------------------------------- 30 | curl -X POST http://127.0.0.1:8200/ \ 31 | -H "Authorization: Bearer secret_token" 32 | 33 | { 34 | "build_date": "2021-12-18T19:59:06Z", 35 | "build_sha": "24fe620eeff5a19e2133c940c7e5ce1ceddb1445", 36 | "publish_ready": true, 37 | "version": "{version}" 38 | } 39 | --------------------------------------------------------------------------- 40 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/api-metricset.asciidoc: -------------------------------------------------------------------------------- 1 | [[api-metricset]] 2 | ==== Metrics 3 | 4 | Metrics contain application metric data captured by an {apm-agent}. 5 | 6 | [[api-metricset-schema]] 7 | [float] 8 | ==== Metric Schema 9 | 10 | APM Server uses JSON Schema to validate requests. The specification for metrics is defined on 11 | {github_repo_link}/docs/spec/v2/metricset.json[GitHub] and included below: 12 | 13 | [source,json] 14 | ---- 15 | include::./spec/v2/metricset.json[] 16 | ---- 17 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/api-span.asciidoc: -------------------------------------------------------------------------------- 1 | [[api-span]] 2 | ==== Spans 3 | 4 | Spans are events captured by an agent occurring in a monitored service. 5 | 6 | [[api-span-schema]] 7 | [float] 8 | ==== Span Schema 9 | 10 | APM Server uses JSON Schema to validate requests. The specification for spans is defined on 11 | {github_repo_link}/docs/spec/v2/span.json[GitHub] and included below: 12 | 13 | [source,json] 14 | ---- 15 | include::./spec/v2/span.json[] 16 | ---- 17 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/api-transaction.asciidoc: -------------------------------------------------------------------------------- 1 | [[api-transaction]] 2 | ==== Transactions 3 | 4 | Transactions are events corresponding to an incoming request or similar task occurring in a monitored service. 5 | 6 | [[api-transaction-schema]] 7 | [float] 8 | ==== Transaction Schema 9 | 10 | APM Server uses JSON Schema to validate requests. The specification for transactions is defined on 11 | {github_repo_link}/docs/spec/v2/transaction.json[GitHub] and included below: 12 | 13 | [source,json] 14 | ---- 15 | include::./spec/v2/transaction.json[] 16 | ---- 17 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/api.asciidoc: -------------------------------------------------------------------------------- 1 | [[api]] 2 | == API 3 | 4 | The APM Server exposes endpoints for: 5 | 6 | * <> 7 | * <> 8 | * <> 9 | 10 | include::./api-events.asciidoc[] 11 | include::./api-config.asciidoc[] 12 | include::./api-info.asciidoc[] 13 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/apm-overview.asciidoc: -------------------------------------------------------------------------------- 1 | [[apm-overview]] 2 | == Free and open application performance monitoring 3 | 4 | ++++ 5 | What is APM? 6 | ++++ 7 | 8 | Elastic APM is an application performance monitoring system built on the {stack}. 9 | It allows you to monitor software services and applications in real-time, by 10 | collecting detailed performance information on response time for incoming requests, 11 | database queries, calls to caches, external HTTP requests, and more. 12 | This makes it easy to pinpoint and fix performance problems quickly. 13 | 14 | Elastic APM also automatically collects unhandled errors and exceptions. 15 | Errors are grouped based primarily on the stack trace, 16 | so you can identify new errors as they appear and keep an eye on how many times specific errors happen. 17 | 18 | Metrics are another vital source of information when debugging production systems. 19 | Elastic APM agents automatically pick up basic host-level metrics and agent-specific metrics, 20 | like JVM metrics in the Java Agent, and Go runtime metrics in the Go Agent. 21 | 22 | [float] 23 | === Give Elastic APM a try 24 | 25 | Learn more about the <> that make up Elastic APM 26 | // , 27 | // or jump right into the <>. 28 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/apm-quick-start.asciidoc: -------------------------------------------------------------------------------- 1 | [[apm-quick-start]] 2 | == Quick start 3 | 4 | // * Point to EA APT/YUM 5 | // * Point to EA for running on Docker 6 | // * Point to EA for directory layout 7 | // * Point to EA for systemd 8 | 9 | include::{obs-repo-dir}/observability/ingest-traces.asciidoc[tag=apm-quick-start] 10 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/apm-rum.asciidoc: -------------------------------------------------------------------------------- 1 | [[apm-rum]] 2 | === Real User Monitoring (RUM) 3 | Real User Monitoring captures user interaction with clients such as web browsers. 4 | The {apm-rum-ref-v}[JavaScript Agent] is Elastic’s RUM Agent. 5 | // To use it you need to {apm-server-ref-v}/configuration-rum.html[enable RUM support] in the APM Server. 6 | 7 | Unlike Elastic APM backend agents which monitor requests and responses, 8 | the RUM JavaScript agent monitors the real user experience and interaction within your client-side application. 9 | The RUM JavaScript agent is also framework-agnostic, which means it can be used with any front-end JavaScript application. 10 | 11 | You will be able to measure metrics such as "Time to First Byte", `domInteractive`, 12 | and `domComplete` which helps you discover performance issues within your client-side application as well as issues that relate to the latency of your server-side application. 13 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/apm-tune-elasticsearch.asciidoc: -------------------------------------------------------------------------------- 1 | [[apm-tune-elasticsearch]] 2 | === Tune {es} for data ingestion 3 | 4 | ++++ 5 | Tune {es} 6 | ++++ 7 | 8 | The {es} Reference provides insight on tuning {es}. 9 | 10 | {ref}/tune-for-indexing-speed.html[Tune for indexing speed] provides information on: 11 | 12 | * Refresh interval 13 | * Disabling swapping 14 | * Optimizing file system cache 15 | * Considerations regarding faster hardware 16 | * Setting the indexing buffer size 17 | 18 | {ref}/tune-for-disk-usage.html[Tune for disk usage] provides information on: 19 | 20 | * Disabling unneeded features 21 | * Shard size 22 | * Shrink index 23 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/aws-lambda-extension.asciidoc: -------------------------------------------------------------------------------- 1 | // Pulls the AWS Lambda extension docs from here: 2 | // https://github.com/elastic/apm-aws-lambda/blob/main/docs/aws-lambda-extension.asciidoc 3 | 4 | include::{apm-aws-repo-dir}/monitoring-aws-lambda.asciidoc[] 5 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/features.asciidoc: -------------------------------------------------------------------------------- 1 | [[features]] 2 | == Elastic APM features 3 | 4 | ++++ 5 | Features 6 | ++++ 7 | 8 | * <> 9 | * <> 10 | * <> 11 | * <> 12 | * <> 13 | * <> 14 | * <> 15 | * <> 16 | * <> 17 | 18 | include::./apm-data-security.asciidoc[] 19 | 20 | include::./apm-distributed-tracing.asciidoc[] 21 | 22 | include::./apm-rum.asciidoc[] 23 | 24 | include::./sampling.asciidoc[] 25 | 26 | include::./open-telemetry.asciidoc[] 27 | 28 | include::./log-correlation.asciidoc[] 29 | 30 | include::./cross-cluster-search.asciidoc[] 31 | 32 | include::./span-compression.asciidoc[] 33 | 34 | include::./aws-lambda-extension.asciidoc[leveloffset=+2] 35 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/guide/index.asciidoc: -------------------------------------------------------------------------------- 1 | // This file exists to keep the current build working. 2 | // Delete this file when the APM Overview is no longer built in main and 7.16 3 | 4 | include::../legacy/guide/index.asciidoc[] 5 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/how-to.asciidoc: -------------------------------------------------------------------------------- 1 | [[how-to-guides]] 2 | == How-to guides 3 | 4 | Learn how to perform common APM configuration and management tasks. 5 | 6 | * <> 7 | * <> 8 | * <> 9 | * <> 10 | * <> 11 | 12 | include::./source-map-how-to.asciidoc[] 13 | 14 | include::./jaeger-integration.asciidoc[] 15 | 16 | include::./monitor.asciidoc[] 17 | 18 | include::./ingest-pipelines.asciidoc[] 19 | 20 | include::./custom-index-template.asciidoc[] 21 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/agent-settings-migration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/agent-settings-migration.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/api-key-copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/api-key-copy.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/apm-architecture-cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/apm-architecture-cloud.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/apm-architecture-diy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/apm-architecture-diy.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/apm-architecture-two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/apm-architecture-two.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/apm-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/apm-architecture.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/apm-distributed-tracing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/apm-distributed-tracing.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/apm-ui-api-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/apm-ui-api-key.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/assets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/assets.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/config-layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/config-layer.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/create-component-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/create-component-template.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/data-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/data-flow.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/data-stream-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/data-stream-overview.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/dt-sampling-example-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/dt-sampling-example-1.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/dt-sampling-example-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/dt-sampling-example-2.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/dt-sampling-example-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/dt-sampling-example-3.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/dt-trace-ex1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/dt-trace-ex1.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/dt-trace-ex2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/dt-trace-ex2.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/dt-trace-ex3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/dt-trace-ex3.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/ingest-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/ingest-flow.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/layers.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/scale-apm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/scale-apm.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/schema-agent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/schema-agent.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/server-api-key-create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/server-api-key-create.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/source-map-after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/source-map-after.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/images/source-map-before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/images/source-map-before.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/index.asciidoc: -------------------------------------------------------------------------------- 1 | // This file exists to keep the current build working. 2 | // Delete this file when the APM Server Reference is no longer built in main and 7.16 3 | 4 | include::legacy/index.asciidoc[] 5 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/ingest-pipelines.asciidoc: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // This content is reused in the Legacy ingest pipeline 3 | ////////////////////////////////////////////////////////////////////////// 4 | 5 | [[ingest-pipelines]] 6 | === Parse data using ingest pipelines 7 | 8 | :append-legacy: 9 | // tag::ingest-pipelines[] 10 | 11 | Ingest pipelines preprocess and enrich APM documents before indexing them. 12 | For example, a pipeline might define one processor that removes a field, and another that renames a field. 13 | This can be useful for ensuring data security by removing or obfuscating sensitive information. 14 | See <> for more on this topic. 15 | 16 | The default APM pipelines are defined in index templates that {fleet} loads into {es}. 17 | {es} then uses the index pattern in these index templates to match pipelines to APM data streams. 18 | 19 | [discrete] 20 | [id="view-edit-default-pipelines{append-legacy}"] 21 | === View ingest pipelines 22 | 23 | To view or edit a default pipelines in {kib}, 24 | select **{stack-manage-app}** > **Ingest Pipelines**. 25 | Search for `apm`. 26 | 27 | It is not currently possible to edit or add pipelines that persist through upgrades. 28 | 29 | See {ref}/ingest.html[ingest node pipelines] for more information. 30 | 31 | // end::ingest-pipelines[] -------------------------------------------------------------------------------- /schema/apm-8.3/docs/integrations-index.asciidoc: -------------------------------------------------------------------------------- 1 | include::./version.asciidoc[] 2 | include::{asciidoc-dir}/../../shared/attributes.asciidoc[] 3 | include::./notices.asciidoc[] 4 | 5 | :apm-integration-docs: 6 | :apm-package-dir: {docdir}/apm-package 7 | :obs-repo-dir: {observability-docs-root}/docs/en 8 | :apm-aws-repo-dir: {apm-aws-lambda-root}/docs 9 | 10 | :github_repo_link: https://github.com/elastic/apm-server/blob/v{version} 11 | ifeval::["{version}" == "8.0.0"] 12 | :github_repo_link: https://github.com/elastic/apm-server/blob/main 13 | endif::[] 14 | 15 | [[apm-user-guide]] 16 | = APM User Guide 17 | 18 | include::apm-overview.asciidoc[] 19 | 20 | include::apm-components.asciidoc[] 21 | 22 | include::apm-quick-start.asciidoc[] 23 | 24 | include::data-model.asciidoc[] 25 | 26 | include::features.asciidoc[] 27 | 28 | include::how-to.asciidoc[] 29 | 30 | include::manage-storage.asciidoc[] 31 | 32 | include::input-apm.asciidoc[] 33 | 34 | include::secure-agent-communication.asciidoc[] 35 | 36 | include::api.asciidoc[] 37 | 38 | include::troubleshoot-apm.asciidoc[] 39 | 40 | include::upgrading.asciidoc[] 41 | 42 | include::release-notes.asciidoc[leveloffset=+1] 43 | 44 | // Legacy APM Overview 45 | include::legacy/guide/index.asciidoc[] 46 | 47 | // Legacy APM Server Reference 48 | include::legacy/index.asciidoc[] 49 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/config-ownership.asciidoc: -------------------------------------------------------------------------------- 1 | [float] 2 | [[config-file-ownership]] 3 | ==== Configuration file ownership 4 | 5 | On systems with POSIX file permissions, 6 | the {beatname_uc} configuration file is subject to ownership and file permission checks. 7 | These checks prevent unauthorized users from providing or modifying configurations that are run by {beatname_uc}. 8 | 9 | When installed via an RPM or DEB package, 10 | the configuration file at +/etc/{beatname_lc}/{beatname_lc}.yml+ will be owned by +{beatname_lc}+, 11 | and have file permissions of `0600` (`-rw-------`). 12 | 13 | {beatname_uc} will only start if the configuration file is owned by the user running the process, 14 | or by running as root with configuration ownership set to `root:root` 15 | 16 | You may encounter the following errors if your configuration file fails these checks: 17 | 18 | ["source", "systemd", subs="attributes"] 19 | ----- 20 | Exiting: error loading config file: config file ("/etc/{beatname_lc}/{beatname_lc}.yml") 21 | must be owned by the user identifier (uid=1000) or root 22 | ----- 23 | 24 | To correct this problem you can change the ownership of the configuration file with: 25 | +chown {beatname_lc}:{beatname_lc} /etc/{beatname_lc}/{beatname_lc}.yml+. 26 | 27 | You can also make root the config owner, although this is not recommended: 28 | +sudo chown root:root /etc/{beatname_lc}/{beatname_lc}.yml+. 29 | 30 | ["source", "systemd", subs="attributes"] 31 | ----- 32 | Exiting: error loading config file: config file ("/etc/{beatname_lc}/{beatname_lc}.yml") 33 | can only be writable by the owner but the permissions are "-rw-rw-r--" 34 | (to fix the permissions use: 'chmod go-w /etc/{beatname_lc}/{beatname_lc}.yml') 35 | ----- 36 | 37 | To correct this problem, use +chmod go-w /etc/{beatname_lc}/{beatname_lc}.yml+ to 38 | remove write privileges from anyone other than the owner. 39 | 40 | [float] 41 | ===== Disabling strict permission checks 42 | 43 | You can disable strict permission checks from the command line by using 44 | `--strict.perms=false`, but we strongly encourage you to leave the checks enabled. 45 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/configuring-ingest.asciidoc: -------------------------------------------------------------------------------- 1 | [[configuring-ingest-node]] 2 | == Parse data using ingest node pipelines 3 | 4 | deprecated::[7.16.0,Users should now use the <>. See <> if you've already upgraded.] 5 | 6 | // Appends `-legacy` to each section's ID so that they are different from the APM integration IDs 7 | :append-legacy: -legacy 8 | 9 | include::../ingest-pipelines.asciidoc[tag=ingest-pipelines] 10 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/configuring-output-after.asciidoc: -------------------------------------------------------------------------------- 1 | [[sourcemap-output]] 2 | 3 | [float] 4 | === Source maps 5 | 6 | Source maps can be uploaded through all outputs but must eventually be stored in {es}. 7 | When using outputs other than {es}, `source_mapping.elasticsearch` must be set for source maps to be applied. 8 | Be sure to update `source_mapping.index_pattern` if source maps are stored in the non-default location. 9 | See <> for more details. 10 | 11 | [[libbeat-configuration-fields]] 12 | [float] 13 | === `fields` 14 | 15 | Fields are optional tags that can be added to the documents that APM Server outputs. 16 | They are defined at the top-level in your configuration file, and will apply to any configured output. 17 | Fields can be scalar values, arrays, dictionaries, or any nested combination of these. 18 | By default, the fields that you specify here will be grouped under a `fields` sub-dictionary in the output document. 19 | 20 | Example using the {es} output: 21 | 22 | [source,yaml] 23 | ------------------------------------------------------------------------------ 24 | fields: {project: "myproject", instance-id: "574734885120952459"} 25 | #-------------------------- Elasticsearch output -------------------------- 26 | output.elasticsearch: 27 | hosts: ["localhost:9200"] 28 | ------------------------------------------------------------------------------ 29 | 30 | To store the custom fields as top-level fields, set the `fields_under_root` option to true. 31 | This is not recommended as when new fields are added to APM documents backward compatibility cannot be ensured. 32 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/docs/debugging.asciidoc: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | //// This content is shared by all Elastic Beats. Make sure you keep the 3 | //// descriptions here generic enough to work for all Beats that include 4 | //// this file. When using cross references, make sure that the cross 5 | //// references resolve correctly for any files that include this one. 6 | //// Use the appropriate variables defined in the index.asciidoc file to 7 | //// resolve Beat names: beatname_uc and beatname_lc. 8 | //// Use the following include to pull this content into a doc file: 9 | //// include::../../libbeat/docs/debugging.asciidoc[] 10 | ////////////////////////////////////////////////////////////////////////// 11 | 12 | IMPORTANT: {deprecation-notice-data} 13 | 14 | By default, {beatname_uc} sends all its output to syslog. When you run {beatname_uc} in 15 | the foreground, you can use the `-e` command line flag to redirect the output to 16 | standard error instead. For example: 17 | 18 | ["source","sh",subs="attributes"] 19 | ----------------------------------------------- 20 | {beatname_lc} -e 21 | ----------------------------------------------- 22 | 23 | The default configuration file is {beatname_lc}.yml (the location of the file varies by 24 | platform). You can use a different configuration file by specifying the `-c` flag. For example: 25 | 26 | ["source","sh",subs="attributes"] 27 | ------------------------------------------------------------ 28 | {beatname_lc} -e -c my{beatname_lc}config.yml 29 | ------------------------------------------------------------ 30 | 31 | You can increase the verbosity of debug messages by enabling one or more debug 32 | selectors. For example, to view publisher-related messages, start {beatname_uc} 33 | with the `publisher` selector: 34 | 35 | ["source","sh",subs="attributes"] 36 | ------------------------------------------------------------ 37 | {beatname_lc} -e -d "publisher" 38 | ------------------------------------------------------------ 39 | 40 | If you want all the debugging output (fair warning, it's quite a lot), you can 41 | use `*`, like this: 42 | 43 | ["source","sh",subs="attributes"] 44 | ------------------------------------------------------------ 45 | {beatname_lc} -e -d "*" 46 | ------------------------------------------------------------ 47 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/docs/getting-help.asciidoc: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | //// This content is shared by all Elastic Beats. Make sure you keep the 3 | //// descriptions here generic enough to work for all Beats that include 4 | //// this file. When using cross references, make sure that the cross 5 | //// references resolve correctly for any files that include this one. 6 | //// Use the appropriate variables defined in the index.asciidoc file to 7 | //// resolve Beat names: beatname_uc and beatname_lc. 8 | //// Use the following include to pull this content into a doc file: 9 | //// include::../../libbeat/docs/getting-help.asciidoc[] 10 | ////////////////////////////////////////////////////////////////////////// 11 | 12 | IMPORTANT: {deprecation-notice-data} 13 | 14 | Start by searching the https://discuss.elastic.co/c/{discuss_forum}[{beatname_uc} discussion forum] for your issue. If you can't find a resolution, open a new issue or add a comment to an existing one. Make sure you provide the following information, and we'll help 15 | you troubleshoot the problem: 16 | 17 | * {beatname_uc} version 18 | * Operating System 19 | * Configuration 20 | * Any supporting information, such as debugging output, that will help us diagnose your 21 | problem. See <> for more details. 22 | 23 | If you're sure you found a bug, you can open a ticket on 24 | https://github.com/elastic/{github_repo_name}/issues?state=open[GitHub]. Note, however, 25 | that we close GitHub issues containing questions or requests for help if they 26 | don't indicate the presence of a bug. 27 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/docs/howto/load-index-templates.asciidoc: -------------------------------------------------------------------------------- 1 | [id="{beatname_lc}-template"] 2 | == View the {es} index template 3 | 4 | // Appends `-legacy` to each section's ID so that they are different from the APM integration IDs 5 | :append-legacy: -legacy 6 | 7 | IMPORTANT: {deprecation-notice-data} 8 | If you've already upgraded, please see <> instead. 9 | 10 | include::../../../../custom-index-template.asciidoc[tag=index-template-integration] 11 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/docs/monitoring/monitoring-beats.asciidoc: -------------------------------------------------------------------------------- 1 | [role="xpack"] 2 | [[monitoring]] 3 | = Monitor {beatname_uc} 4 | 5 | ++++ 6 | Monitor 7 | ++++ 8 | 9 | IMPORTANT: {deprecation-notice-monitor} 10 | 11 | You can use the {stack} {monitor-features} to gain insight into the health of 12 | ifndef::apm-server[] 13 | {beatname_uc} instances running in your environment. 14 | endif::[] 15 | ifdef::apm-server[] 16 | {beatname_uc}. 17 | endif::[] 18 | 19 | To monitor {beatname_uc}, make sure monitoring is enabled on your {es} cluster, 20 | then configure the method used to collect {beatname_uc} metrics. You can use one 21 | of following methods: 22 | 23 | * <> - Internal 24 | collectors send monitoring data directly to your monitoring cluster. 25 | ifndef::serverless[] 26 | * <> - 27 | {metricbeat} collects monitoring data from your {beatname_uc} instance 28 | and sends it directly to your monitoring cluster. 29 | endif::[] 30 | 31 | //Commenting out this link temporarily until the general monitoring docs can be 32 | //updated. 33 | //To learn about monitoring in general, see 34 | //{ref}/monitor-elasticsearch-cluster.html[Monitor a cluster]. 35 | 36 | include::monitoring-internal-collection.asciidoc[] 37 | 38 | ifndef::serverless[] 39 | include::monitoring-metricbeat.asciidoc[] 40 | endif::[] 41 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/docs/outputconfig.asciidoc: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | //// This content is shared by all Elastic Beats. Make sure you keep the 3 | //// descriptions here generic enough to work for all Beats that include 4 | //// this file. When using cross references, make sure that the cross 5 | //// references resolve correctly for any files that include this one. 6 | //// Use the appropriate variables defined in the index.asciidoc file to 7 | //// resolve Beat names: beatname_uc and beatname_lc. 8 | //// Use the following include to pull this content into a doc file: 9 | //// include::../../libbeat/docs/outputconfig.asciidoc[] 10 | //// Make sure this content appears below a level 2 heading. 11 | ////////////////////////////////////////////////////////////////////////// 12 | 13 | 14 | [[configuring-output]] 15 | == Configure the output 16 | 17 | ++++ 18 | Output 19 | ++++ 20 | 21 | IMPORTANT: {deprecation-notice-config} 22 | 23 | You configure {beatname_uc} to write to a specific output by setting options 24 | in the Outputs section of the +{beatname_lc}.yml+ config file. Only a single 25 | output may be defined. 26 | 27 | The following topics describe how to configure each supported output. If you've 28 | secured the {stack}, also read <> for more about 29 | security-related configuration options. 30 | 31 | include::outputs-list.asciidoc[tag=outputs-list] 32 | 33 | ifdef::beat-specific-output-config[] 34 | include::{beat-specific-output-config}[] 35 | endif::[] 36 | 37 | include::outputs-list.asciidoc[tag=outputs-include] 38 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/docs/outputs-list.asciidoc: -------------------------------------------------------------------------------- 1 | // TODO: Create script that generates this file. Conditional coding needs to 2 | // be preserved. 3 | 4 | //# tag::outputs-list[] 5 | 6 | ifndef::no_cloud_id[] 7 | * <> 8 | endif::[] 9 | ifndef::no_es_output[] 10 | * <> 11 | endif::[] 12 | ifndef::no_ls_output[] 13 | * <> 14 | endif::[] 15 | ifndef::no_kafka_output[] 16 | * <> 17 | endif::[] 18 | ifndef::no_redis_output[] 19 | * <> 20 | endif::[] 21 | ifndef::no_file_output[] 22 | * <> 23 | endif::[] 24 | ifndef::no_console_output[] 25 | * <> 26 | endif::[] 27 | 28 | //# end::outputs-list[] 29 | 30 | //# tag::outputs-include[] 31 | ifndef::no_cloud_id[] 32 | ifdef::requires_xpack[] 33 | [role="xpack"] 34 | endif::[] 35 | include::output-cloud.asciidoc[] 36 | endif::[] 37 | 38 | ifndef::no_es_output[] 39 | ifdef::requires_xpack[] 40 | [role="xpack"] 41 | endif::[] 42 | include::{libbeat-outputs-dir}/elasticsearch/docs/elasticsearch.asciidoc[] 43 | endif::[] 44 | 45 | ifndef::no_ls_output[] 46 | ifdef::requires_xpack[] 47 | [role="xpack"] 48 | endif::[] 49 | include::{libbeat-outputs-dir}/logstash/docs/logstash.asciidoc[] 50 | endif::[] 51 | 52 | ifndef::no_kafka_output[] 53 | ifdef::requires_xpack[] 54 | [role="xpack"] 55 | endif::[] 56 | include::{libbeat-outputs-dir}/kafka/docs/kafka.asciidoc[] 57 | endif::[] 58 | 59 | ifndef::no_redis_output[] 60 | ifdef::requires_xpack[] 61 | [role="xpack"] 62 | endif::[] 63 | include::{libbeat-outputs-dir}/redis/docs/redis.asciidoc[] 64 | endif::[] 65 | 66 | ifndef::no_file_output[] 67 | ifdef::requires_xpack[] 68 | [role="xpack"] 69 | endif::[] 70 | include::{libbeat-outputs-dir}/fileout/docs/fileout.asciidoc[] 71 | endif::[] 72 | 73 | ifndef::no_console_output[] 74 | ifdef::requires_xpack[] 75 | [role="xpack"] 76 | endif::[] 77 | include::{libbeat-outputs-dir}/console/docs/console.asciidoc[] 78 | endif::[] 79 | 80 | ifndef::no_codec[] 81 | ifdef::requires_xpack[] 82 | [role="xpack"] 83 | endif::[] 84 | include::{libbeat-outputs-dir}/codec/docs/codec.asciidoc[] 85 | endif::[] 86 | 87 | //# end::outputs-include[] 88 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/docs/shared-securing-beat.asciidoc: -------------------------------------------------------------------------------- 1 | [id="securing-{beatname_lc}"] 2 | = Secure {beatname_uc} 3 | 4 | ++++ 5 | Secure 6 | ++++ 7 | 8 | IMPORTANT: {deprecation-notice-config} 9 | If you're using {fleet} and the Elastic APM integration, please see <> instead. 10 | 11 | The following topics provide information about securing the {beatname_uc} 12 | process and connecting to a cluster that has {security-features} enabled. 13 | 14 | You can use role-based access control and optionally, API keys to grant {beatname_uc} users access to 15 | secured resources. 16 | 17 | * <> 18 | * <>. 19 | 20 | After privileged users have been created, use authentication to connect to a secured Elastic cluster. 21 | 22 | * <> 23 | ifndef::no-output-logstash[] 24 | * <> 25 | endif::[] 26 | 27 | ifdef::apm-server[] 28 | For secure communication between APM Server and APM Agents, see <>. 29 | endif::[] 30 | 31 | ifndef::serverless[] 32 | ifndef::win_only[] 33 | On Linux, {beatname_uc} can take advantage of secure computing mode to restrict the 34 | system calls that a process can issue. 35 | 36 | * <> 37 | endif::[] 38 | endif::[] 39 | 40 | // APM HTTPS information 41 | ifdef::beat-specific-security[] 42 | include::{beat-specific-security}[] 43 | endif::[] 44 | 45 | 46 | 47 | ifdef::apm-server[] 48 | // APM privileges 49 | include::{docdir}/legacy/feature-roles.asciidoc[] 50 | // APM API keys 51 | include::{docdir}/legacy/api-keys.asciidoc[] 52 | endif::[] 53 | 54 | ifndef::apm-server[] 55 | // Beat privileges 56 | include::./security/users.asciidoc[] 57 | // Beat API keys 58 | include::./security/api-keys.asciidoc[] 59 | endif::[] 60 | 61 | // APM Agent security 62 | ifdef::apm-server[] 63 | include::{docdir}/legacy/secure-communication-agents.asciidoc[] 64 | endif::[] 65 | 66 | // Elasticsearch security 67 | include::./https.asciidoc[] 68 | 69 | // Logstash security 70 | ifndef::no-output-logstash[] 71 | include::./shared-ssl-logstash-config.asciidoc[] 72 | endif::[] 73 | 74 | // Linux Seccomp 75 | ifndef::serverless[] 76 | ifndef::win_only[] 77 | include::./security/linux-seccomp.asciidoc[] 78 | endif::[] 79 | endif::[] 80 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/docs/shared/configuring-intro.asciidoc: -------------------------------------------------------------------------------- 1 | 2 | ifndef::apm-server[] 3 | TIP: To get started quickly, read <<{beatname_lc}-installation-configuration>>. 4 | endif::[] 5 | 6 | To configure {beatname_uc}, edit the configuration file. The default 7 | configuration file is called +{beatname_lc}.yml+. The location of the file 8 | varies by platform. To locate the file, see <>. 9 | 10 | ifndef::apm-server[] 11 | There’s also a full example configuration file called +{beatname_lc}.reference.yml+ 12 | that shows all non-deprecated options. 13 | endif::[] 14 | 15 | TIP: See the 16 | {beats-ref}/config-file-format.html[Config File Format] for more about the 17 | structure of the config file. 18 | 19 | The following topics describe how to configure {beatname_uc}: 20 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/outputs/codec/docs/codec.asciidoc: -------------------------------------------------------------------------------- 1 | [[configuration-output-codec]] 2 | === Change the output codec 3 | 4 | IMPORTANT: {deprecation-notice-config} 5 | 6 | For outputs that do not require a specific encoding, you can change the encoding 7 | by using the codec configuration. You can specify either the `json` or `format` 8 | codec. By default the `json` codec is used. 9 | 10 | *`json.pretty`*: If `pretty` is set to true, events will be nicely formatted. The default is false. 11 | 12 | *`json.escape_html`*: If `escape_html` is set to true, HTML symbols will be escaped in strings. The default is false. 13 | 14 | Example configuration that uses the `json` codec with pretty printing enabled to write events to the console: 15 | 16 | [source,yaml] 17 | ------------------------------------------------------------------------------ 18 | output.console: 19 | codec.json: 20 | pretty: true 21 | escape_html: false 22 | ------------------------------------------------------------------------------ 23 | 24 | *`format.string`*: Configurable format string used to create a custom formatted message. 25 | 26 | Example configurable that uses the `format` codec to print the events timestamp and message field to console: 27 | 28 | [source,yaml] 29 | ------------------------------------------------------------------------------ 30 | output.console: 31 | codec.format: 32 | string: '%{[@timestamp]} %{[message]}' 33 | ------------------------------------------------------------------------------ 34 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/copied-from-beats/outputs/console/docs/console.asciidoc: -------------------------------------------------------------------------------- 1 | [[console-output]] 2 | === Configure the Console output 3 | 4 | ++++ 5 | Console 6 | ++++ 7 | 8 | IMPORTANT: {deprecation-notice-config} 9 | 10 | The Console output writes events in JSON format to stdout. 11 | 12 | WARNING: The Console output should be used only for debugging issues as it can produce a large amount of logging data. 13 | 14 | To use this output, edit the {beatname_uc} configuration file to disable the {es} 15 | output by commenting it out, and enable the console output by adding `output.console`. 16 | 17 | Example configuration: 18 | 19 | [source,yaml] 20 | ------------------------------------------------------------------------------ 21 | output.console: 22 | pretty: true 23 | ------------------------------------------------------------------------------ 24 | 25 | ==== Configuration options 26 | 27 | You can specify the following `output.console` options in the +{beatname_lc}.yml+ config file: 28 | 29 | ===== `enabled` 30 | 31 | The enabled config is a boolean setting to enable or disable the output. If set 32 | to false, the output is disabled. 33 | 34 | The default value is `true`. 35 | 36 | ===== `pretty` 37 | 38 | If `pretty` is set to true, events written to stdout will be nicely formatted. The default is false. 39 | 40 | ===== `codec` 41 | 42 | Output codec configuration. If the `codec` section is missing, events will be JSON encoded using the `pretty` option. 43 | 44 | See <> for more information. 45 | 46 | ===== `bulk_max_size` 47 | 48 | The maximum number of events to buffer internally during publishing. The default is 2048. 49 | 50 | Specifying a larger batch size may add some latency and buffering during publishing. However, for Console output, this 51 | setting does not affect how events are published. 52 | 53 | Setting `bulk_max_size` to values less than or equal to 0 disables the 54 | splitting of batches. When splitting is disabled, the queue decides on the 55 | number of events to be contained in a batch. 56 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/error-api.asciidoc: -------------------------------------------------------------------------------- 1 | [[error-api]] 2 | === Errors 3 | 4 | An error or a logged error message captured by an agent occurring in a monitored service. 5 | 6 | [float] 7 | [[error-schema]] 8 | ==== Error Schema 9 | 10 | APM Server uses JSON Schema to validate requests. The specification for errors is defined on 11 | {github_repo_link}/docs/spec/v2/error.json[GitHub] and included below: 12 | 13 | [source,json] 14 | ---- 15 | include::../spec/v2/error.json[] 16 | ---- 17 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/error-indices.asciidoc: -------------------------------------------------------------------------------- 1 | [[error-indices]] 2 | == Example error documents 3 | 4 | ++++ 5 | Error documents 6 | ++++ 7 | 8 | This example shows what error documents can look like when indexed in {es}: 9 | 10 | [source,json] 11 | ---- 12 | include::../data/elasticsearch/generated/errors.json[] 13 | ---- 14 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/example-intake-events.asciidoc: -------------------------------------------------------------------------------- 1 | [[example-intake-events]] 2 | === Example Request Body 3 | 4 | A request body example containing one event for all currently supported event types. 5 | 6 | [source,json] 7 | ---- 8 | include::../data/intake-api/generated/events.ndjson[] 9 | ---- 10 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/features.asciidoc: -------------------------------------------------------------------------------- 1 | [[apm-features]] 2 | == Elastic APM features 3 | 4 | IMPORTANT: {deprecation-notice-data} 5 | If you've already upgraded, see <>. 6 | 7 | ++++ 8 | Features 9 | ++++ 10 | 11 | * <> 12 | * <> 13 | * <> 14 | * <> 15 | * <> 16 | * <> 17 | * <> 18 | * <> 19 | 20 | include::./data-security.asciidoc[] 21 | 22 | include::./distributed-tracing.asciidoc[] 23 | 24 | include::./rum.asciidoc[] 25 | 26 | include::./trace-sampling.asciidoc[] 27 | 28 | include::./opentracing.asciidoc[] 29 | 30 | include::./opentelemetry-elastic.asciidoc[] 31 | 32 | include::./obs-integrations.asciidoc[] 33 | 34 | include::./cross-cluster-search.asciidoc[] -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/7.7-apm-agent-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/7.7-apm-agent-configuration.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/7.7-apm-alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/7.7-apm-alert.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/7.7-service-maps-java.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/7.7-service-maps-java.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/7.8-service-map-anomaly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/7.8-service-map-anomaly.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/apm-architecture-cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/apm-architecture-cloud.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/apm-architecture-diy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/apm-architecture-diy.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/apm-distributed-tracing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/apm-distributed-tracing.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/apm-highlight-breakdown-charts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/apm-highlight-breakdown-charts.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/apm-highlight-rum-maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/apm-highlight-rum-maps.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/apm-highlight-sample-rate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/apm-highlight-sample-rate.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/apm-settings-kib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/apm-settings-kib.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/apm-transactions-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/apm-transactions-overview.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/breakdown-release-notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/breakdown-release-notes.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/chained-exceptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/chained-exceptions.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/dt-sampling-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/dt-sampling-example.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/dt-trace-ex1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/dt-trace-ex1.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/dt-trace-ex2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/dt-trace-ex2.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/dt-trace-ex3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/dt-trace-ex3.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/ecommerce-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/ecommerce-dashboard.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/geo-location.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/geo-location.jpg -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/java-kafka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/java-kafka.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/java-metadata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/java-metadata.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/jvm-release-notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/jvm-release-notes.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/kibana-geo-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/kibana-geo-data.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/open-telemetry-elastic-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/open-telemetry-elastic-arch.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/open-telemetry-exporter-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/open-telemetry-exporter-arch.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/open-telemetry-protocol-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/open-telemetry-protocol-arch.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/remote-config-release-notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/remote-config-release-notes.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/siem-apm-integration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/siem-apm-integration.png -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/images/structured-filters.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nipwaayoni/elastic-apm-php-agent/b5ffe97f068ebb21ce21526c8eb80d86f414b832/schema/apm-8.3/docs/legacy/guide/images/structured-filters.jpg -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/index.asciidoc: -------------------------------------------------------------------------------- 1 | include::../../version.asciidoc[] 2 | include::{asciidoc-dir}/../../shared/attributes.asciidoc[] 3 | 4 | :apm-ref-all: https://www.elastic.co/guide/en/apm/get-started/ 5 | 6 | ifndef::apm-integration-docs[] 7 | [[gettting-started]] 8 | = APM Overview 9 | endif::[] 10 | 11 | ifdef::apm-integration-docs[] 12 | // Overwrite links to the APM Overview and APM Server Ref. Point to APM Guide instead. 13 | :apm-overview-ref-v: {apm-guide-ref} 14 | :apm-guide-ref: {apm-guide-ref} 15 | :apm-server-ref-v: {apm-guide-ref} 16 | :apm-server-ref: {apm-guide-ref} 17 | 18 | [[legacy-apm-overview]] 19 | = Legacy APM Overview 20 | 21 | include::./overview.asciidoc[] 22 | endif::[] 23 | 24 | include::./apm-doc-directory.asciidoc[] 25 | 26 | include::./install-and-run.asciidoc[] 27 | 28 | include::./quick-start-overview.asciidoc[] 29 | 30 | include::./apm-data-model.asciidoc[] 31 | 32 | include::./features.asciidoc[] 33 | 34 | include::./troubleshooting.asciidoc[] 35 | 36 | include::./apm-breaking-changes.asciidoc[] 37 | 38 | include::./redirects.asciidoc[] 39 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/opentracing.asciidoc: -------------------------------------------------------------------------------- 1 | [[opentracing]] 2 | === OpenTracing bridge 3 | 4 | IMPORTANT: {deprecation-notice-data} 5 | 6 | Most Elastic APM agents have https://opentracing.io/[OpenTracing] compatible bridges. 7 | 8 | The OpenTracing bridge allows you to create Elastic APM <> and <> using the OpenTracing API. 9 | This means you can reuse your existing OpenTracing instrumentation to quickly and easily begin using Elastic APM. 10 | 11 | [float] 12 | ==== Agent specific details 13 | 14 | Not all features of the OpenTracing API are supported, and there are some Elastic APM-specific tags you should be aware of. Please see the relevant Agent documentation for more detailed information: 15 | 16 | * {apm-go-ref-v}/opentracing.html[Go agent] 17 | * {apm-java-ref-v}/opentracing-bridge.html[Java agent] 18 | * {apm-node-ref-v}/opentracing.html[Node.js agent] 19 | // * {apm-py-ref-v}/opentelemetry-bridge.html[Python agent] 20 | * https://www.elastic.co/guide/en/apm/agent/python/6.x/opentelemetry-bridge.html[Python agent] 21 | * {apm-ruby-ref-v}/opentracing.html[Ruby agent] 22 | * {apm-rum-ref-v}/opentracing.html[JavaScript Real User Monitoring (RUM) agent] 23 | 24 | Additionally, the iOS agent can utilize the https://github.com/open-telemetry/opentelemetry-swift/tree/main/Sources/Importers/OpenTracingShim[`opentelemetry-swift/OpenTracingShim`]. 25 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/overview.asciidoc: -------------------------------------------------------------------------------- 1 | **** 2 | There are two ways to install, run, and manage Elastic APM: 3 | 4 | * With the Elastic APM integration 5 | * With the standalone (legacy) APM Server binary 6 | 7 | This documentation focuses on option two: the **standalone (legacy) APM Server binary**. 8 | {deprecation-notice-installation} 9 | **** 10 | 11 | Elastic APM is an application performance monitoring system built on the {stack}. 12 | It allows you to monitor software services and applications in real-time, by 13 | collecting detailed performance information on response time for incoming requests, 14 | database queries, calls to caches, external HTTP requests, and more. 15 | This makes it easy to pinpoint and fix performance problems quickly. 16 | 17 | Elastic APM also automatically collects unhandled errors and exceptions. 18 | Errors are grouped based primarily on the stack trace, 19 | so you can identify new errors as they appear and keep an eye on how many times specific errors happen. 20 | 21 | Metrics are another vital source of information when debugging production systems. 22 | Elastic APM agents automatically pick up basic host-level metrics and agent-specific metrics, 23 | like JVM metrics in the Java Agent, and Go runtime metrics in the Go Agent. 24 | 25 | [float] 26 | == Give Elastic APM a try 27 | 28 | Learn more about the <> that make up Elastic APM, 29 | or jump right into the <>. 30 | 31 | NOTE: These docs will indiscriminately use the word "service" for both services and applications. -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/quick-start-overview.asciidoc: -------------------------------------------------------------------------------- 1 | 2 | [[quick-start-overview]] 3 | === Quick start development environment 4 | 5 | IMPORTANT: {deprecation-notice-installation} 6 | 7 | // This tagged region is reused in the Observability docs. 8 | // tag::dev-environment[] 9 | ifeval::["{release-state}"=="unreleased"] 10 | 11 | Version {version} of APM Server has not yet been released. 12 | 13 | endif::[] 14 | 15 | ifeval::["{release-state}"!="unreleased"] 16 | 17 | If you're just looking for a quick way to try out Elastic APM, you can easily get started with Docker. 18 | Just follow the steps below. 19 | 20 | **Create a docker-compose.yml file** 21 | 22 | The https://www.docker.elastic.co/[Elastic Docker registry] contains Docker images for all of the products 23 | in the {stack}. 24 | You can use Docker compose to easily get the default distributions of {es}, {kib}, 25 | and APM Server up and running in Docker. 26 | 27 | Create a `docker-compose.yml` file and copy and paste in the following: 28 | 29 | ["source","yaml",subs="attributes"] 30 | -------------------------------------------- 31 | include::./docker-compose.yml[] 32 | -------------------------------------------- 33 | 34 | **Compose** 35 | 36 | Run `docker-compose up`. 37 | Compose will download the official docker containers and start {es}, {kib}, and APM Server. 38 | 39 | **Install Agents** 40 | 41 | When Compose finishes, navigate to http://localhost:5601/app/kibana#/home/tutorial/apm. 42 | Complete steps 4-6 to configure your application to collect and report APM data. 43 | 44 | **Visualize** 45 | 46 | Use the {apm-app} at http://localhost:5601/app/apm to visualize your application performance data! 47 | 48 | When you're done, `ctrl+c` will stop all of the containers. 49 | 50 | **Advanced Docker usage** 51 | 52 | If you're interested in learning more about all of the APM features available, 53 | or running the Elastic stack on Docker in a production environment, see the following documentation: 54 | 55 | * {apm-server-ref-v}/running-on-docker.html[Running APM Server on Docker] 56 | * {ref}/docker.html#docker-compose-file[Running {es} and {kib} on Docker] 57 | 58 | endif::[] 59 | // end::dev-environment[] 60 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/redirects.asciidoc: -------------------------------------------------------------------------------- 1 | ifndef::apm-integration-docs[] 2 | ["appendix",role="exclude",id="redirects"] 3 | = Deleted pages 4 | endif::[] 5 | 6 | ifdef::apm-integration-docs[] 7 | ["appendix",role="exclude",id="legacy-apm-redirects"] 8 | = Deleted pages 9 | endif::[] 10 | 11 | The following pages do not exist. They may have moved, been deleted, or have not been created yet. 12 | 13 | [role="exclude",id="go-compatibility"] 14 | === Go Agent Compatibility 15 | 16 | This page has moved. Please see <>. 17 | 18 | [role="exclude",id="java-compatibility"] 19 | === Java Agent Compatibility 20 | 21 | This page has moved. Please see <>. 22 | 23 | [role="exclude",id="dotnet-compatibility"] 24 | === .NET Agent Compatibility 25 | 26 | This page has moved. Please see <>. 27 | 28 | [role="exclude",id="nodejs-compatibility"] 29 | === Node.js Agent Compatibility 30 | 31 | This page has moved. Please see <>. 32 | 33 | [role="exclude",id="python-compatibility"] 34 | === Python Agent Compatibility 35 | 36 | This page has moved. Please see <>. 37 | 38 | [role="exclude",id="ruby-compatibility"] 39 | === Ruby Agent Compatibility 40 | 41 | This page has moved. Please see <>. 42 | 43 | [role="exclude",id="rum-compatibility"] 44 | === RUM Agent Compatibility 45 | 46 | This page has moved. Please see <>. 47 | 48 | [role="exclude",id="apm-release-notes"] 49 | === APM release highlights 50 | 51 | This page has moved. 52 | Please see {observability-guide}/whats-new.html[What's new in {observability} {minor-version}]. 53 | 54 | Please see <>. 55 | 56 | [role="exclude",id="whats-new"] 57 | === What's new in APM {minor-version} 58 | 59 | This page has moved. 60 | Please see {observability-guide}/whats-new.html[What's new in {observability} {minor-version}]. 61 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/rum.asciidoc: -------------------------------------------------------------------------------- 1 | [[rum]] 2 | === Real User Monitoring (RUM) 3 | 4 | IMPORTANT: {deprecation-notice-data} 5 | If you've already upgraded, see <>. 6 | 7 | Real User Monitoring captures user interaction with clients such as web browsers. 8 | The {apm-rum-ref-v}[JavaScript Agent] is Elastic’s RUM Agent. 9 | To use it you need to {apm-server-ref-v}/configuration-rum.html[enable RUM support] in the APM Server. 10 | 11 | Unlike Elastic APM backend agents which monitor requests and responses, 12 | the RUM JavaScript agent monitors the real user experience and interaction within your client-side application. 13 | The RUM JavaScript agent is also framework-agnostic, which means it can be used with any front-end JavaScript application. 14 | 15 | You will be able to measure metrics such as "Time to First Byte", `domInteractive`, 16 | and `domComplete` which helps you discover performance issues within your client-side application as well as issues that relate to the latency of your server-side application. -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/guide/troubleshooting.asciidoc: -------------------------------------------------------------------------------- 1 | [[troubleshooting-guide]] 2 | == Troubleshooting 3 | 4 | IMPORTANT: {deprecation-notice-data} 5 | If you've already upgraded, see <>. 6 | 7 | If you run into trouble, there are three places you can look for help. 8 | 9 | [float] 10 | === Troubleshooting documentation 11 | 12 | The APM Server, {apm-app}, and each {apm-agent} has a troubleshooting guide: 13 | 14 | * {apm-server-ref-v}/troubleshooting.html[APM Server troubleshooting] 15 | * {kibana-ref}/troubleshooting.html[{apm-app} troubleshooting] 16 | * {apm-dotnet-ref-v}/troubleshooting.html[.NET agent troubleshooting] 17 | * {apm-go-ref-v}/troubleshooting.html[Go agent troubleshooting] 18 | * {apm-ios-ref-v}/troubleshooting.html[iOS agent troubleshooting] 19 | * {apm-java-ref-v}/trouble-shooting.html[Java agent troubleshooting] 20 | * {apm-node-ref-v}/troubleshooting.html[Node.js agent troubleshooting] 21 | * {apm-php-ref-v}/troubleshooting.html[PHP agent troubleshooting] 22 | * {apm-py-ref-v}/troubleshooting.html[Python agent troubleshooting] 23 | * {apm-ruby-ref-v}/debugging.html[Ruby agent troubleshooting] 24 | * {apm-rum-ref-v}/troubleshooting.html[RUM troubleshooting] 25 | 26 | [float] 27 | === Elastic Support 28 | 29 | We offer a support experience unlike any other. 30 | Our team of professionals 'speak human and code' and love making your day. 31 | https://www.elastic.co/subscriptions[Learn more about subscriptions]. 32 | 33 | [float] 34 | === Discussion forum 35 | 36 | For additional questions and feature requests, 37 | visit our https://discuss.elastic.co/c/apm[discussion forum]. 38 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/high-availability.asciidoc: -------------------------------------------------------------------------------- 1 | [[high-availability]] 2 | === High Availability 3 | 4 | IMPORTANT: {deprecation-notice-installation} 5 | 6 | To achieve high availability 7 | you can place multiple instances of APM Server behind a regular HTTP load balancer, 8 | for example HAProxy or Nginx. 9 | 10 | The endpoint `/` always returns an `HTTP 200`. 11 | You can configure your load balancer to send HTTP requests to this endpoint 12 | to determine if an APM Server is running. 13 | See <> for more information on that endpoint. 14 | 15 | In case of temporal issues, like unavailable {es} or a sudden high workload, 16 | APM Server does not have an internal queue to buffer requests, 17 | but instead leverages an HTTP request timeout to act as back-pressure. 18 | 19 | If {es} goes down, the APM Server will eventually deny incoming requests. 20 | Both the APM Server and {apm-agent}(s) will issue logs accordingly. 21 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/howto.asciidoc: -------------------------------------------------------------------------------- 1 | [[howto-guides]] 2 | = How-to guides 3 | 4 | IMPORTANT: {deprecation-notice-data} 5 | If you've already upgraded, please see <> instead. 6 | 7 | Learn how to perform common {beatname_uc} configuration and management tasks. 8 | 9 | * <> 10 | * <> 11 | * <> 12 | * <<{beatname_lc}-template>> 13 | * <> 14 | * <> 15 | * <> 16 | 17 | include::./sourcemaps.asciidoc[] 18 | 19 | include::./ilm.asciidoc[] 20 | 21 | include::./jaeger-support.asciidoc[] 22 | 23 | include::{libbeat-dir}/howto/load-index-templates.asciidoc[] 24 | 25 | include::./storage-management.asciidoc[] 26 | 27 | include::./configuring-ingest.asciidoc[] 28 | 29 | include::./data-ingestion.asciidoc[] 30 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/ilm.asciidoc: -------------------------------------------------------------------------------- 1 | [[ilm]] 2 | == Custom {ilm} 3 | 4 | // Appends `-legacy` to each section's ID so that they are different from the APM integration IDs 5 | :append-legacy: -legacy 6 | 7 | IMPORTANT: {deprecation-notice-data} 8 | If you've already upgraded, please see <> instead. 9 | 10 | include::../ilm-how-to.asciidoc[tag=ilm-integration] 11 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/intake-api.asciidoc: -------------------------------------------------------------------------------- 1 | [[intake-api]] 2 | = API 3 | 4 | IMPORTANT: {deprecation-notice-api} 5 | If you've already upgraded, see <>. 6 | 7 | The APM Server exposes endpoints for: 8 | 9 | * <> 10 | * <> 11 | * <> 12 | * <> 13 | 14 | include::./events-api.asciidoc[] 15 | include::./sourcemap-api.asciidoc[] 16 | include::./agent-configuration.asciidoc[] 17 | include::./server-info.asciidoc[] 18 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/metricset-api.asciidoc: -------------------------------------------------------------------------------- 1 | [[metricset-api]] 2 | === Metrics 3 | 4 | Metrics contain application metric data captured by an {apm-agent}. 5 | 6 | [[metricset-schema]] 7 | [float] 8 | ==== Metric Schema 9 | 10 | APM Server uses JSON Schema to validate requests. The specification for metrics is defined on 11 | {github_repo_link}/docs/spec/v2/metricset.json[GitHub] and included below: 12 | 13 | [source,json] 14 | ---- 15 | include::../spec/v2/metricset.json[] 16 | ---- 17 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/overview.asciidoc: -------------------------------------------------------------------------------- 1 | **** 2 | There are two ways to install, run, and manage Elastic APM: 3 | 4 | * With the Elastic APM integration 5 | * With the standalone (legacy) APM Server binary 6 | 7 | This documentation focuses on option two: the **standalone (legacy) APM Server binary**. 8 | {deprecation-notice-installation} 9 | **** 10 | 11 | The APM Server receives data from APM agents and transforms them into {es} documents. 12 | It does this by exposing an HTTP server endpoint to which agents stream the APM data they collect. 13 | After the APM Server has validated and processed events from the APM agents, 14 | the server transforms the data into {es} documents and stores them in corresponding {es} indices. 15 | 16 | The APM Server works in conjunction with {apm-agents-ref}/index.html[APM agents], {ref}/index.html[{es}], and {kibana-ref}/index.html[{kib}]. Please view the {apm-overview-ref-v}/index.html[APM Overview] for details on how these components work together. 17 | 18 | NOTE: APM Server is built with the {beats-ref}[{beats}] framework and leverages its functionality. 19 | 20 | [float] 21 | [[why-separate-component]] 22 | === Why is APM Server a separate component? 23 | 24 | The APM Server is a separate component for the following reasons: 25 | 26 | * It helps to keep the agents as light as possible. 27 | * Since the APM Server is a stateless separate component, it can be scaled independently. 28 | * Data is collected in browsers for Real User Monitoring. 29 | APM Server prevents these browsers from interacting directly with {es} (which poses a security risk). 30 | * APM Server controls the amount of data flowing into {es}. 31 | * In cases where {es} becomes unresponsive, 32 | APM Server can buffer data temporarily without adding overhead to the agents. 33 | * Acts as a middleware for source mapping for JavaScript in the browser. 34 | * Provides a JSON API for agents to use and thereby improves compatibility across different versions of agents and the {stack}. 35 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/security.asciidoc: -------------------------------------------------------------------------------- 1 | A reference of all available <> is also available. 2 | 3 | [float] 4 | [[security-overview]] 5 | == Security Overview 6 | 7 | APM Server exposes an HTTP endpoint, and as with anything that opens ports on your servers, 8 | you should be careful about who can connect to it. 9 | Firewall rules are recommended to ensure only authorized systems can connect. 10 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/server-info.asciidoc: -------------------------------------------------------------------------------- 1 | [[server-info]] 2 | == Server Information API 3 | 4 | ++++ 5 | Server information 6 | ++++ 7 | 8 | IMPORTANT: {deprecation-notice-api} 9 | If you've already upgraded, see <>. 10 | 11 | The APM Server exposes an API endpoint to query general server information. 12 | This lightweight endpoint is useful as a server up/down health check. 13 | 14 | [[server-info-endpoint]] 15 | [float] 16 | === Server Information endpoint 17 | Send an `HTTP GET` request to the server information endpoint: 18 | 19 | [source,bash] 20 | ------------------------------------------------------------ 21 | http(s)://{hostname}:{port}/ 22 | ------------------------------------------------------------ 23 | 24 | This endpoint always returns an HTTP 200. 25 | 26 | If an <> or <> is set, only requests including <> will receive server details. 27 | 28 | [[server-info-examples]] 29 | [float] 30 | ==== Example 31 | 32 | Example APM Server information request: 33 | 34 | ["source","sh",subs="attributes"] 35 | --------------------------------------------------------------------------- 36 | curl -X POST http://127.0.0.1:8200/ \ 37 | -H "Authorization: Bearer secret_token" 38 | 39 | { 40 | "build_date": "2021-12-18T19:59:06Z", 41 | "build_sha": "24fe620eeff5a19e2133c940c7e5ce1ceddb1445", 42 | "publish_ready": true, 43 | "version": "{version}" 44 | } 45 | --------------------------------------------------------------------------- 46 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/setting-up-and-running.asciidoc: -------------------------------------------------------------------------------- 1 | 2 | [[setting-up-and-running]] 3 | == Set up APM Server 4 | 5 | ++++ 6 | Set up 7 | ++++ 8 | 9 | IMPORTANT: {deprecation-notice-installation} 10 | 11 | Before reading this section, see the <> 12 | for basic installation and running instructions. 13 | 14 | This section includes additional information on how to set up and run APM Server, including: 15 | 16 | * <> 17 | * <> 18 | * <> 19 | * <> 20 | * <> 21 | 22 | include::{libbeat-dir}/shared-directory-layout.asciidoc[] 23 | 24 | include::{libbeat-dir}/keystore.asciidoc[] 25 | 26 | include::{libbeat-dir}/command-reference.asciidoc[] 27 | 28 | include::./high-availability.asciidoc[] 29 | 30 | include::{libbeat-dir}/shared-systemd.asciidoc[] 31 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/sourcemap-indices.asciidoc: -------------------------------------------------------------------------------- 1 | [[sourcemap-indices]] 2 | == Example source map document 3 | 4 | ++++ 5 | Source map document 6 | ++++ 7 | 8 | This example shows what a source map document can look like when indexed in {es}: 9 | 10 | [source,json] 11 | ---- 12 | include::../data/intake-api/generated/sourcemap/bundle.js.map[] 13 | ---- 14 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/span-api.asciidoc: -------------------------------------------------------------------------------- 1 | [[span-api]] 2 | === Spans 3 | 4 | Spans are events captured by an agent occurring in a monitored service. 5 | 6 | [[span-schema]] 7 | [float] 8 | ==== Span Schema 9 | 10 | APM Server uses JSON Schema to validate requests. The specification for spans is defined on 11 | {github_repo_link}/docs/spec/v2/span.json[GitHub] and included below: 12 | 13 | [source,json] 14 | ---- 15 | include::../spec/v2/span.json[] 16 | ---- 17 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/span-indices.asciidoc: -------------------------------------------------------------------------------- 1 | [[span-indices]] 2 | == Example span documents 3 | 4 | ++++ 5 | Span documents 6 | ++++ 7 | 8 | This example shows what span documents can look like when indexed in {es}: 9 | 10 | [source,json] 11 | ---- 12 | include::../data/elasticsearch/generated/spans.json[] 13 | ---- 14 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/configure-agent-widget.asciidoc: -------------------------------------------------------------------------------- 1 | ++++ 2 |
3 |
4 | 10 | 17 |
18 |
22 | ++++ 23 | 24 | include::configure-agent.asciidoc[tag=central-config] 25 | 26 | ++++ 27 |
28 | 39 |
40 | ++++ -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/configure-agent.asciidoc: -------------------------------------------------------------------------------- 1 | // tag::central-config[] 2 | Central configuration allows you to fine-tune your agent configuration from within the {apm-app}. 3 | Changes are automatically propagated to your APM agents, and there’s no need to redeploy. 4 | 5 | A select number of configuration options are supported. 6 | See {apm-app-ref}/agent-configuration.html[Agent configuration in {kib}] 7 | for more information and a configuration reference. 8 | // end::central-config[] 9 | 10 | // tag::reg-config[] 11 | For a full list of agent configuration options, see the relevant agent reference: 12 | 13 | * {apm-go-ref-v}/configuration.html[Go Agent configuration] 14 | * {apm-ios-ref-v}/configuration.html[iOS Agent configuration] 15 | * {apm-java-ref-v}/configuration.html[Java Agent configuration] 16 | * {apm-dotnet-ref-v}/configuration.html[.NET Agent configuration] 17 | * {apm-node-ref}/configuring-the-agent.html[Node.js Agent configuration] 18 | * {apm-py-ref-v}/configuration.html[Python Agent configuration] 19 | * {apm-ruby-ref-v}/configuration.html[Ruby Agent configuration] 20 | * {apm-rum-ref-v}/configuration.html[RUM Agent configuration] 21 | // end::reg-config[] 22 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/configure-server-widget.asciidoc: -------------------------------------------------------------------------------- 1 | ++++ 2 |
3 |
4 | 10 | 17 |
18 |
22 | ++++ 23 | 24 | include::configure-server.asciidoc[tag=ess] 25 | 26 | ++++ 27 |
28 | 39 |
40 | ++++ -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/configure-server.asciidoc: -------------------------------------------------------------------------------- 1 | // tag::ess[] 2 | 3 | If you're running APM Server in Elastic cloud, you can configure your own user settings right in the {es} Service Console. 4 | Any changes are automatically appended to the `apm-server.yml` configuration file for your instance. 5 | 6 | Full details are available in the {cloud}/ec-manage-apm-settings.html[APM user settings] documentation. 7 | 8 | // end::ess[] 9 | 10 | // tag::self-managed[] 11 | 12 | If you've installed APM Server yourself, you can edit the `apm-server.yml` configuration file to make changes. 13 | More information is available in {apm-guide-ref}/configuring-howto-apm-server.html[configuring APM Server]. 14 | 15 | Don't forget to also read about 16 | {apm-guide-ref}/securing-apm-server.html[securing APM Server], and 17 | {apm-guide-ref}/monitoring.html[monitoring APM Server]. 18 | 19 | // end::self-managed[] 20 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/jaeger-sampling-widget.asciidoc: -------------------------------------------------------------------------------- 1 | ++++ 2 |
3 |
4 | 10 | 17 |
18 |
22 | ++++ 23 | 24 | include::jaeger-sampling.asciidoc[tag=ess] 25 | 26 | ++++ 27 |
28 | 39 |
40 | ++++ -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/jaeger-sampling.asciidoc: -------------------------------------------------------------------------------- 1 | // tag::ess[] 2 | Visit the {kibana-ref}/agent-configuration.html[Agent configuration] page in the {apm-app} to add a new sampling rate. 3 | 4 | // end::ess[] 5 | 6 | // tag::self-managed[] 7 | APM Agent central configuration requires the <> to be configured. 8 | To enable the {kib} endpoint, set <> to `true`, 9 | and point <> at the {kib} host that APM Server will communicate with. 10 | 11 | Once configured, 12 | visit the {kibana-ref}/agent-configuration.html[Agent configuration] page in the {apm-app} to add a new sampling rate. 13 | 14 | // end::self-managed[] 15 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/jaeger-widget.asciidoc: -------------------------------------------------------------------------------- 1 | ++++ 2 |
3 |
4 | 10 | 17 |
18 |
22 | ++++ 23 | 24 | include::jaeger.asciidoc[tag=ess] 25 | 26 | ++++ 27 |
28 | 39 |
40 | ++++ -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/jaeger.asciidoc: -------------------------------------------------------------------------------- 1 | // tag::ess[] 2 | . Log into {ess-console}[{ecloud}] and select your deployment. 3 | Copy your APM endpoint and APM Server secret token; you'll need these in the next step. 4 | 5 | . Configure APM Server as a collector for your Jaeger agents. 6 | + 7 | As of this writing, the Jaeger agent binary offers the following CLI flags, 8 | which can be used to enable TLS, output to {ecloud}, and set the APM Server secret token: 9 | + 10 | [source,terminal] 11 | ---- 12 | --reporter.grpc.tls.enabled=true 13 | --reporter.grpc.host-port= 14 | --agent.tags="elastic-apm-auth=Bearer " 15 | ---- 16 | 17 | TIP: For the equivalent environment variables, 18 | change all letters to upper-case and replace punctuation with underscores (`_`). 19 | See the https://www.jaegertracing.io/docs/1.22/cli/[Jaeger CLI flags documentation] for more information. 20 | 21 | // end::ess[] 22 | 23 | // tag::self-managed[] 24 | . Configure APM Server as a collector for your Jaeger agents. 25 | + 26 | As of this writing, the Jaeger agent binary offers the `--reporter.grpc.host-port` CLI flag. 27 | Use this to define the <> that APM Server is listening on: 28 | + 29 | [source,terminal] 30 | ---- 31 | --reporter.grpc.host-port= 32 | ---- 33 | 34 | . (Optional) Enable encryption 35 | + 36 | When <> is enabled in APM Server, Jaeger agents must also enable TLS communication: 37 | + 38 | [source,terminal] 39 | ---- 40 | --reporter.grpc.tls.enabled=true 41 | ---- 42 | 43 | . (Optional) Enable token-based authorization 44 | + 45 | A <> or <> can be used to ensure only authorized 46 | Jaeger agents can send data to the APM Server. 47 | When enabled, use an agent level tag to authorize Jaeger agent communication with the APM Server: 48 | + 49 | [source,terminal] 50 | ---- 51 | --agent.tags="elastic-apm-auth=Bearer " 52 | ---- 53 | 54 | TIP: For the equivalent environment variables, 55 | change all letters to upper-case and replace punctuation with underscores (`_`). 56 | See the https://www.jaegertracing.io/docs/1.22/cli/[Jaeger CLI flags documentation] for more information. 57 | 58 | // end::self-managed[] 59 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/kibana-endpoint-widget.asciidoc: -------------------------------------------------------------------------------- 1 | ++++ 2 |
3 |
4 | 10 | 17 |
18 |
22 | ++++ 23 | 24 | include::kibana-endpoint.asciidoc[tag=ess] 25 | 26 | ++++ 27 |
28 | 39 |
40 | ++++ -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/kibana-endpoint.asciidoc: -------------------------------------------------------------------------------- 1 | // tag::ess[] 2 | 3 | The {kib} endpoint is automatically enabled and configured in {ecloud}. 4 | 5 | // end::ess[] 6 | 7 | // tag::self-managed[] 8 | 9 | Enable and configure the {kib} endpoint in the `apm-server.kibana` section of the `apm-server.yml` 10 | config file. A basic configuration might look like this: 11 | 12 | [source,yml] 13 | ---- 14 | apm-server.kibana.enabled: true 15 | apm-server.kibana.host: "http://localhost:5601" 16 | apm-server.kibana.username: "user" 17 | apm-server.kibana.password: "pass" 18 | ---- 19 | 20 | See <> for a full list of configuration options. 21 | 22 | // end::self-managed[] 23 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/spin-up-stack-widget.asciidoc: -------------------------------------------------------------------------------- 1 | ++++ 2 |
3 |
4 | 10 | 17 |
18 |
22 | ++++ 23 | 24 | include::spin-up-stack.asciidoc[tag=ess] 25 | 26 | ++++ 27 |
28 | 39 |
40 | ++++ -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/tab-widgets/spin-up-stack.asciidoc: -------------------------------------------------------------------------------- 1 | // tag::ess[] 2 | There's no faster way to get started with Elastic APM than with our hosted {ess} on {ecloud}. 3 | {ess} is available on AWS, GCP, and Azure, 4 | and automatically configures APM Server to work with {es} and {kib}: 5 | 6 | . {ess-trial}[Get a free trial]. 7 | 8 | . Log into {ess-console}[{ecloud}]. 9 | 10 | . Click *Create deployment*. 11 | 12 | . Select *Elastic {observability}* and give your deployment a name. 13 | 14 | . Click *Create deployment* and copy the password for the `elastic` user. 15 | 16 | . Select *APM* from the menu on the left and make note of the APM endpoint and APM Server secret token. 17 | You'll need these in step two. 18 | 19 | // end::ess[] 20 | 21 | // tag::self-managed[] 22 | To install and run {es} and {kib}, see {stack-ref}/installing-elastic-stack.html[Installing the {stack}]. 23 | 24 | Next, install, set up, and run APM Server: 25 | 26 | . {apm-server-ref-v}/installing.html[Install APM Server]. 27 | . {apm-server-ref-v}/apm-server-configuration.html[Set up APM Server] 28 | . {apm-server-ref-v}/setting-up-and-running.html[Start APM Server]. 29 | 30 | Use the config file if you need to change the default configuration that APM Server uses to connect to {es}, 31 | or if you need to specify credentials: 32 | 33 | * {apm-server-ref-v}/configuring-howto-apm-server.html[Configuring APM Server] 34 | ** {apm-server-ref-v}/configuration-process.html[General configuration options] 35 | ** {apm-server-ref-v}/configuring-output.html[Configure the {es} output] 36 | 37 | [[secure-api-access]] 38 | If you change the listen address from `localhost` to something that is accessible from outside of the machine, 39 | we recommend setting up firewall rules to ensure that only your own systems can access the API. 40 | Alternatively, 41 | you can use a {apm-server-ref-v}/securing-apm-server.html[TLS and a secret token or API key]. 42 | 43 | If you have APM Server running on the same host as your service, 44 | you can configure it to listen on a Unix domain socket. 45 | 46 | [[more-information]] 47 | TIP: For detailed instructions on how to install and secure APM Server in your server environment, 48 | including details on how to run APM Server in a highly available environment, 49 | please see the full {apm-server-ref-v}/index.html[APM Server documentation]. 50 | 51 | // end::self-managed[] 52 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/transaction-api.asciidoc: -------------------------------------------------------------------------------- 1 | [[transaction-api]] 2 | === Transactions 3 | 4 | Transactions are events corresponding to an incoming request or similar task occurring in a monitored service. 5 | 6 | [[transaction-schema]] 7 | [float] 8 | ==== Transaction Schema 9 | 10 | APM Server uses JSON Schema to validate requests. The specification for transactions is defined on 11 | {github_repo_link}/docs/spec/v2/transaction.json[GitHub] and included below: 12 | 13 | [source,json] 14 | ---- 15 | include::../spec/v2/transaction.json[] 16 | ---- 17 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/transaction-indices.asciidoc: -------------------------------------------------------------------------------- 1 | [[transaction-indices]] 2 | == Example transaction documents 3 | 4 | ++++ 5 | Transaction documents 6 | ++++ 7 | 8 | This example shows what transaction documents can look like when indexed in {es}: 9 | 10 | [source,json] 11 | ---- 12 | include::../data/elasticsearch/generated/transactions.json[] 13 | ---- 14 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/transaction-metrics.asciidoc: -------------------------------------------------------------------------------- 1 | [x-pack] 2 | [[transaction-metrics]] 3 | == Configure transaction metrics 4 | 5 | ++++ 6 | Transaction metrics 7 | ++++ 8 | 9 | IMPORTANT: {deprecation-notice-config} 10 | 11 | {beatname_uc} produces transaction histogram metrics that are used to power the {apm-app}. 12 | Shifting this responsibility from {apm-app} to APM Server removes the need to store unsampled transactions, reducing storage costs. 13 | 14 | Example config file: 15 | 16 | ["source","yaml"] 17 | ---- 18 | apm-server: 19 | aggregation: 20 | transactions: 21 | interval: 1m 22 | ---- 23 | 24 | [float] 25 | [[configuration-aggregation]] 26 | === Configuration options: `apm-server.aggregation.transactions.*` 27 | 28 | [[transactions-interval]] 29 | [float] 30 | ==== `interval` 31 | 32 | Controls the frequency of metrics publication. 33 | 34 | Default: `1m`. 35 | 36 | [[transactions-max_groups]] 37 | [float] 38 | ==== `max_groups` 39 | 40 | Maximum number of transaction groups to keep track of. 41 | Once exceeded, APM Server devolves into recording a metrics document for each transaction that is not in one 42 | of the transaction groups being tracked. 43 | 44 | Default: `10000`. 45 | 46 | [[transactions-hdrhistogram_significant_figures]] 47 | [float] 48 | ==== `hdrhistogram_significant_figures` 49 | 50 | The fixed, worst-case percentage error (specified as a number of significant digits) 51 | to maintain for recorded metrics. 52 | Supported values are `1` through `5`. 53 | See {ref}/search-aggregations-metrics-percentile-aggregation.html#_hdr_histogram_2[HDR histogram] for more information. 54 | 55 | Default: `2`. 56 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/legacy/troubleshooting.asciidoc: -------------------------------------------------------------------------------- 1 | [[troubleshooting]] 2 | = Troubleshoot 3 | 4 | IMPORTANT: {deprecation-notice-data} 5 | 6 | If you have issues installing or running APM Server, 7 | read the following tips: 8 | 9 | * <> 10 | * <> 11 | * <> 12 | 13 | Other sections in the documentation may also be helpful: 14 | 15 | * <> 16 | * <> 17 | * <> 18 | * <> 19 | * {apm-overview-ref-v}/agent-server-compatibility.html[Agent/Server compatibility matrix] 20 | 21 | If your issue is potentially related to other components of the APM ecosystem, 22 | don't forget to check the relevant troubleshooting guides: 23 | 24 | * {kibana-ref}/troubleshooting.html[{apm-app} troubleshooting] 25 | * {apm-dotnet-ref-v}/troubleshooting.html[.NET agent troubleshooting] 26 | * {apm-go-ref-v}/troubleshooting.html[Go agent troubleshooting] 27 | * {apm-ios-ref-v}/troubleshooting.html[iOS agent troubleshooting] 28 | * {apm-java-ref-v}/trouble-shooting.html[Java agent troubleshooting] 29 | * {apm-node-ref-v}/troubleshooting.html[Node.js agent troubleshooting] 30 | * {apm-php-ref-v}/troubleshooting.html[PHP agent troubleshooting] 31 | * {apm-py-ref-v}/troubleshooting.html[Python agent troubleshooting] 32 | * {apm-ruby-ref-v}/debugging.html[Ruby agent troubleshooting] 33 | * {apm-rum-ref-v}/troubleshooting.html[RUM troubleshooting] 34 | 35 | include::common-problems.asciidoc[] 36 | 37 | [[enable-apm-server-debugging]] 38 | == Debug 39 | 40 | include::{libbeat-dir}/debugging.asciidoc[] 41 | 42 | [[getting-help]] 43 | == Get help 44 | 45 | include::{libbeat-dir}/getting-help.asciidoc[] -------------------------------------------------------------------------------- /schema/apm-8.3/docs/notices.asciidoc: -------------------------------------------------------------------------------- 1 | // For installation, get started, and setup docs 2 | :deprecation-notice-installation: This method of installing APM Server will be deprecated and removed in a future release. Please consider getting started with the <> instead. 3 | 4 | // Generic "running" message 5 | // Usually followed by a link to the corresponding APM integration docs 6 | :deprecation-notice-data: This documentation refers to the standalone (legacy) method of running APM Server. This method of running APM Server will be deprecated and removed in a future release. Please consider <>. 7 | 8 | // For monitoring docs 9 | :deprecation-notice-monitor: This documentation refers to monitoring the standalone (legacy) APM Server. This method of running APM Server will be deprecated and removed in a future release. Please consider <>. 10 | 11 | // For configuration docs 12 | :deprecation-notice-config: This documentation refers to configuring the standalone (legacy) APM Server. This method of running APM Server will be deprecated and removed in a future release. Please consider <>. 13 | 14 | // For API docs 15 | :deprecation-notice-api: This documentation refers to the API of the standalone (legacy) APM Server. This method of running APM Server will be deprecated and removed in a future release. Please consider <>. 16 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/overview.asciidoc: -------------------------------------------------------------------------------- 1 | [[apm-overview]] 2 | == Free and open application performance monitoring 3 | 4 | ++++ 5 | What is APM? 6 | ++++ 7 | 8 | Elastic APM is an application performance monitoring system built on the {stack}. 9 | It allows you to monitor software services and applications in real-time, by 10 | collecting detailed performance information on response time for incoming requests, 11 | database queries, calls to caches, external HTTP requests, and more. 12 | This makes it easy to pinpoint and fix performance problems quickly. 13 | 14 | Elastic APM also automatically collects unhandled errors and exceptions. 15 | Errors are grouped based primarily on the stack trace, 16 | so you can identify new errors as they appear and keep an eye on how many times specific errors happen. 17 | 18 | Metrics are another vital source of information when debugging production systems. 19 | Elastic APM agents automatically pick up basic host-level metrics and agent-specific metrics, 20 | like JVM metrics in the Java Agent, and Go runtime metrics in the Go Agent. 21 | 22 | [float] 23 | === Give Elastic APM a try 24 | 25 | Learn more about the <> that make up Elastic APM, 26 | or jump right into the <>. 27 | 28 | NOTE: These docs will indiscriminately use the word "service" for both services and applications. 29 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/processing-performance.asciidoc: -------------------------------------------------------------------------------- 1 | [[processing-and-performance]] 2 | === Processing and performance 3 | 4 | APM Server performance depends on a number of factors: memory and CPU available, 5 | network latency, transaction sizes, workload patterns, 6 | agent and server settings, versions, and protocol. 7 | 8 | Let's look at a simple example that makes the following assumptions: 9 | 10 | * The load is generated in the same region as where APM Server and {es} are deployed. 11 | * We're using the default settings in cloud. 12 | * A small number of agents are reporting. 13 | 14 | This leaves us with relevant variables like payload and instance sizes. 15 | See the table below for approximations. 16 | As a reminder, events are 17 | <> and 18 | <>. 19 | 20 | [options="header"] 21 | |======================================================================= 22 | |Transaction/Instance |512 MB Instance |2 GB Instance |8 GB Instance 23 | |Small transactions 24 | 25 | _5 spans with 5 stack frames each_ |600 events/second |1200 events/second |4800 events/second 26 | |Medium transactions 27 | 28 | _15 spans with 15 stack frames each_ |300 events/second |600 events/second |2400 events/second 29 | |Large transactions 30 | 31 | _30 spans with 30 stack frames each_ |150 events/second |300 events/second |1400 events/second 32 | |======================================================================= 33 | 34 | In other words, a 512 MB instance can process \~3 MB per second, 35 | while an 8 GB instance can process ~20 MB per second. 36 | 37 | APM Server is CPU bound, so it scales better from 2 GB to 8 GB than it does from 512 MB to 2 GB. 38 | This is because larger instance types in {ecloud} come with much more computing power. 39 | 40 | Don't forget that the APM Server is stateless. 41 | Several instances running do not need to know about each other. 42 | This means that with a properly sized {es} instance, APM Server scales out linearly. 43 | 44 | NOTE: RUM deserves special consideration. The RUM agent runs in browsers, and there can be many thousands reporting to an APM Server with very variable network latency. -------------------------------------------------------------------------------- /schema/apm-8.3/docs/release-notes.asciidoc: -------------------------------------------------------------------------------- 1 | :root-dir: ../ 2 | 3 | [[release-notes]] 4 | = Release notes 5 | :issue: https://github.com/elastic/apm-server/issues/ 6 | :pull: https://github.com/elastic/apm-server/pull/ 7 | 8 | This section summarizes the changes in each release. 9 | 10 | * <> 11 | * <> 12 | * <> 13 | * <> 14 | 15 | Looking for a previous version? See the {apm-guide-7x}/release-notes.html[7.x release notes]. 16 | 17 | include::{root-dir}/CHANGELOG.asciidoc[] 18 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/shared/jaeger/jaeger-widget.asciidoc: -------------------------------------------------------------------------------- 1 | ++++ 2 |
3 |
4 | 10 | 17 |
18 |
22 | ++++ 23 | 24 | include::jaeger.asciidoc[tag=ess] 25 | 26 | ++++ 27 |
28 | 39 |
40 | ++++ -------------------------------------------------------------------------------- /schema/apm-8.3/docs/shared/open-kibana/open-kibana-widget.asciidoc: -------------------------------------------------------------------------------- 1 | ++++ 2 |
3 |
4 | 10 | 17 |
18 |
22 | ++++ 23 | 24 | include::open-kibana.asciidoc[tag=cloud] 25 | 26 | ++++ 27 |
28 | 39 |
40 | ++++ -------------------------------------------------------------------------------- /schema/apm-8.3/docs/shared/open-kibana/open-kibana.asciidoc: -------------------------------------------------------------------------------- 1 | // tag::cloud[] 2 | . https://cloud.elastic.co/[Log in] to your {ecloud} account. 3 | 4 | . Navigate to the {kib} endpoint in your deployment. 5 | // end::cloud[] 6 | 7 | // tag::self-managed[] 8 | Point your browser to http://localhost:5601[http://localhost:5601], replacing 9 | `localhost` with the name of the {kib} host. 10 | // end::self-managed[] -------------------------------------------------------------------------------- /schema/apm-8.3/docs/tab-widgets/configure-agent-widget.asciidoc: -------------------------------------------------------------------------------- 1 | // delete after PR in obs-docs repository -------------------------------------------------------------------------------- /schema/apm-8.3/docs/tab-widgets/configure-server-widget.asciidoc: -------------------------------------------------------------------------------- 1 | // delete after PR in obs-docs repository -------------------------------------------------------------------------------- /schema/apm-8.3/docs/tab-widgets/install-agents-widget.asciidoc: -------------------------------------------------------------------------------- 1 | // delete after PR in obs-docs repository -------------------------------------------------------------------------------- /schema/apm-8.3/docs/troubleshoot-apm.asciidoc: -------------------------------------------------------------------------------- 1 | [[troubleshoot-apm]] 2 | == Troubleshooting 3 | 4 | This section provides solutions to <> 5 | and <> guidance. 6 | For additional help, see the links below. 7 | 8 | [float] 9 | [[troubleshooting-docs]] 10 | === Troubleshooting documentation 11 | 12 | {agent}, the {apm-app}, and each {apm-agent} has its own troubleshooting guide: 13 | 14 | * {fleet-guide}/troubleshooting-intro.html[*{fleet} and {agent}* troubleshooting] 15 | * {kibana-ref}/troubleshooting.html[*{apm-app}* troubleshooting] 16 | * {apm-dotnet-ref-v}/troubleshooting.html[*.NET agent* troubleshooting] 17 | * {apm-go-ref-v}/troubleshooting.html[*Go agent* troubleshooting] 18 | * {apm-ios-ref-v}/troubleshooting.html[*iOS agent* troubleshooting] 19 | * {apm-java-ref-v}/trouble-shooting.html[*Java agent* troubleshooting] 20 | * {apm-node-ref-v}/troubleshooting.html[*Node.js agent* troubleshooting] 21 | * {apm-php-ref-v}/troubleshooting.html[*PHP agent* troubleshooting] 22 | * {apm-py-ref-v}/troubleshooting.html[*Python agent* troubleshooting] 23 | * {apm-ruby-ref-v}/debugging.html[*Ruby agent* troubleshooting] 24 | * {apm-rum-ref-v}/troubleshooting.html[*RUM agent* troubleshooting] 25 | 26 | [float] 27 | [[elastic-support]] 28 | === Elastic Support 29 | 30 | We offer a support experience unlike any other. 31 | Our team of professionals 'speak human and code' and love making your day. 32 | https://www.elastic.co/subscriptions[Learn more about subscriptions]. 33 | 34 | [float] 35 | [[discussion-forum]] 36 | === Discussion forum 37 | 38 | For additional questions and feature requests, 39 | visit our https://discuss.elastic.co/c/apm[discussion forum]. 40 | 41 | include::common-problems.asciidoc[] 42 | 43 | include::processing-performance.asciidoc[] -------------------------------------------------------------------------------- /schema/apm-8.3/docs/upgrading.asciidoc: -------------------------------------------------------------------------------- 1 | [[upgrade]] 2 | == Upgrade 3 | 4 | This guide gives general recommendations for upgrading Elastic APM. 5 | 6 | * <> 7 | * <> 8 | * <> 9 | * <> 10 | 11 | include::./agent-server-compatibility.asciidoc[] 12 | 13 | include::./apm-breaking.asciidoc[] 14 | 15 | include::./upgrading-to-8.x.asciidoc[] 16 | 17 | include::./upgrading-to-integration.asciidoc[] 18 | -------------------------------------------------------------------------------- /schema/apm-8.3/docs/version.asciidoc: -------------------------------------------------------------------------------- 1 | // doc-branch can be: master, 8.0, 8.1, etc. 2 | :doc-branch: master 3 | :go-version: 1.17.11 4 | :python: 3.7 5 | :docker: 1.12 6 | :docker-compose: 1.11 7 | 8 | include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[] 9 | 10 | // Agent link attributes 11 | // Used in conjunction with the stack attributes found here: https://github.com/elastic/docs/tree/7d62a6b66d6e9c96e4dd9a96c3dc7c75ceba0288/shared/versions/stack 12 | :apm-dotnet-ref-v: https://www.elastic.co/guide/en/apm/agent/dotnet/{apm-dotnet-branch} 13 | :apm-go-ref-v: https://www.elastic.co/guide/en/apm/agent/go/{apm-go-branch} 14 | :apm-ios-ref-v: https://www.elastic.co/guide/en/apm/agent/swift/{apm-ios-branch} 15 | :apm-java-ref-v: https://www.elastic.co/guide/en/apm/agent/java/{apm-java-branch} 16 | :apm-node-ref-v: https://www.elastic.co/guide/en/apm/agent/nodejs/{apm-node-branch} 17 | :apm-php-ref-v: https://www.elastic.co/guide/en/apm/agent/php/{apm-php-branch} 18 | :apm-py-ref-v: https://www.elastic.co/guide/en/apm/agent/python/{apm-py-branch} 19 | :apm-ruby-ref-v: https://www.elastic.co/guide/en/apm/agent/ruby/{apm-ruby-branch} 20 | :apm-rum-ref-v: https://www.elastic.co/guide/en/apm/agent/rum-js/{apm-rum-branch} 21 | -------------------------------------------------------------------------------- /src/ApmAgent.php: -------------------------------------------------------------------------------- 1 | 0, 24 | 'alert' => 1, 25 | 'critical' => 2, 26 | 'error' => 3, 27 | 'warning' => 4, 28 | 'notice' => 5, 29 | 'info' => 6, 30 | 'debug' => 7, 31 | ]; 32 | 33 | public function __construct(?LoggerInterface $logger = null, string $level = LogLevel::INFO) 34 | { 35 | $this->logger = $logger ?? new NullLogger(); 36 | $this->level = $level; 37 | $this->levelValue = $this->getLevelValue($level); 38 | } 39 | 40 | private function getLevelValue(string $level): int 41 | { 42 | return $this->levels[strtolower($level)]; 43 | } 44 | 45 | /** 46 | * @inheritDoc 47 | */ 48 | public function log($level, $message, array $context = []): void 49 | { 50 | if ($this->doNotLog($level)) { 51 | return; 52 | } 53 | 54 | $this->logger->log($level, self::LOG_PREFIX . ' ' . $message, $context); 55 | } 56 | 57 | private function doNotLog(string $level): bool 58 | { 59 | return $this->getLevelValue($level) > $this->levelValue; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Events/AsyncSpan.php: -------------------------------------------------------------------------------- 1 | transactionSamplingStrategy = new DefaultSampleStrategy(); 13 | } 14 | 15 | /** 16 | * {@inheritdoc} 17 | */ 18 | public function newError(\Throwable $throwable, array $contexts, ?Transaction $parent = null): Error 19 | { 20 | return new Error($throwable, $contexts, $parent); 21 | } 22 | 23 | /** 24 | * Sets the SamplingStrategy to use for Transactions 25 | * 26 | * @param SampleStrategy $strategy 27 | */ 28 | public function setTransactionSampleStrategy(SampleStrategy $strategy): void 29 | { 30 | $this->transactionSamplingStrategy = $strategy; 31 | } 32 | 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public function newTransaction(string $name, array $contexts): Transaction 37 | { 38 | $transaction = new Transaction($name, $contexts); 39 | $transaction->sampleStrategy($this->transactionSamplingStrategy); 40 | 41 | return $transaction; 42 | } 43 | 44 | /** 45 | * {@inheritdoc} 46 | */ 47 | public function newSpan(string $name, EventBean $parent): Span 48 | { 49 | return new Span($name, $parent); 50 | } 51 | 52 | /** 53 | * {@inheritdoc} 54 | */ 55 | public function newAsyncSpan(string $name, EventBean $parent): AsyncSpan 56 | { 57 | return new AsyncSpan($name, $parent); 58 | } 59 | 60 | /** 61 | * {@inheritdoc} 62 | */ 63 | public function newMetricset(array $set, array $tags = []): Metricset 64 | { 65 | return new Metricset($set, $tags); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/Events/DefaultSampleStrategy.php: -------------------------------------------------------------------------------- 1 | 89] 54 | * @param array $tags, Default [] 55 | * 56 | * @return Metricset 57 | */ 58 | public function newMetricset(array $set, array $tags = []): Metricset; 59 | } 60 | -------------------------------------------------------------------------------- /src/Events/Metadata.php: -------------------------------------------------------------------------------- 1 | config = $config; 37 | $this->agentMetaData = $agentMetaData; 38 | } 39 | 40 | /** 41 | * Generate request data 42 | * 43 | * @return array 44 | */ 45 | final public function jsonSerialize(): array 46 | { 47 | return [ 48 | $this->eventType => [ 49 | 'service' => [ 50 | 'name' => Encoding::keywordField($this->config->serviceName()), 51 | 'version' => Encoding::keywordField($this->config->serviceVersion()), 52 | 'framework' => [ 53 | 'name' => $this->config->frameworkName(), 54 | 'version' => $this->config->frameworkVersion(), 55 | ], 56 | 'language' => [ 57 | 'name' => 'php', 58 | 'version' => phpversion() 59 | ], 60 | 'process' => [ 61 | 'pid' => getmypid(), 62 | ], 63 | 'agent' => $this->agentMetaData, 64 | 'environment' => Encoding::keywordField($this->config->environment()) 65 | ], 66 | 'system' => [ 67 | 'hostname' => Encoding::keywordField($this->config->hostname()), 68 | 'architecture' => php_uname('m'), 69 | 'platform' => php_uname('s') 70 | ] 71 | ] 72 | ]; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/Events/Metricset.php: -------------------------------------------------------------------------------- 1 | $v) { 34 | $this->samples[$k] = ['value' => $v]; 35 | } 36 | $this->tags = $tags; 37 | } 38 | 39 | /** 40 | * Serialize Metricset 41 | * 42 | * TODO -- add tags 43 | * 44 | * @return array 45 | */ 46 | public function jsonSerialize(): array 47 | { 48 | return [ 49 | $this->eventType => [ 50 | 'samples' => $this->samples, 51 | // 'tags' => $this->tags, 52 | 'timestamp' => $this->getTimestamp(), 53 | ] 54 | ]; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Events/Samplable.php: -------------------------------------------------------------------------------- 1 | rate = $rate; 16 | } 17 | 18 | public function sampleEvent(): bool 19 | { 20 | $rand = mt_rand(0, mt_getrandmax() - 1) / mt_getrandmax(); 21 | 22 | return $rand <= $this->rate; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Exception/ConfigurationException.php: -------------------------------------------------------------------------------- 1 | apiKey() !== null) { 21 | return new CredentialApiKey($config->apiKey()); 22 | } 23 | 24 | if ($config->secretToken() !== null) { 25 | return new CredentialSecretToken($config->secretToken()); 26 | } 27 | 28 | return new CredentialNull(); 29 | } 30 | 31 | public function makeConnector( 32 | string $serverUrl, 33 | Credential $credential, 34 | ?ClientInterface $httpClient = null, 35 | ?RequestFactoryInterface $requestFactory = null, 36 | ?StreamFactoryInterface $streamFactory = null, 37 | ?callable $preCommitCallback = null, 38 | ?callable $postCommitCallback = null 39 | ): Connector { 40 | return new Connector( 41 | $serverUrl, 42 | $credential, 43 | $httpClient, 44 | $requestFactory, 45 | $streamFactory, 46 | $preCommitCallback, 47 | $postCommitCallback 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Factory/TimerFactory.php: -------------------------------------------------------------------------------- 1 | self::KEYWORD_MAX_LENGTH && mb_strlen($value, 'UTF-8') > self::KEYWORD_MAX_LENGTH) { // strlen is faster (O(1)), so we prefer to first check using it, and then double-checking with the slower mb_strlen (O(n)) only when necessary 29 | return mb_substr($value, 0, self::KEYWORD_MAX_LENGTH - 1, 'UTF-8') . '…'; 30 | } 31 | 32 | return $value; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Helper/StackTrace.php: -------------------------------------------------------------------------------- 1 | $single_backtrace['file'], 24 | 'filename' => basename($single_backtrace['file']), 25 | 'function' => $single_backtrace['function'] ?? null, 26 | 'lineno' => $single_backtrace['line'] ?? null, 27 | 'module' => $single_backtrace['class'] ?? null, 28 | 'vars' => $single_backtrace['args'] ?? null, 29 | ]; 30 | } 31 | return $return_value; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Helper/Timestamp.php: -------------------------------------------------------------------------------- 1 | timestamp = $timestamp; 22 | } 23 | 24 | public function asMicroSeconds(): int 25 | { 26 | return (int) sprintf("%.0f", floor($this->timestamp * self::MICROTIME_MULTIPLIER)); 27 | } 28 | 29 | public function jsonSerialize(): int 30 | { 31 | return $this->asMicroSeconds(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Middleware/Credential.php: -------------------------------------------------------------------------------- 1 | apiKey = $apiKey; 13 | } 14 | 15 | public function includeAuthorizationHeader(): bool 16 | { 17 | return true; 18 | } 19 | 20 | public function authorizationHeaderValue(): string 21 | { 22 | return sprintf('ApiKey %s', $this->apiKey); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Middleware/CredentialNull.php: -------------------------------------------------------------------------------- 1 | secretToken = $secretToken; 13 | } 14 | 15 | public function includeAuthorizationHeader(): bool 16 | { 17 | return true; 18 | } 19 | 20 | public function authorizationHeaderValue(): string 21 | { 22 | return sprintf('Bearer %s', $this->secretToken); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Stores/Store.php: -------------------------------------------------------------------------------- 1 | store; 29 | } 30 | 31 | /** 32 | * Is the Store Empty ? 33 | * 34 | * @return bool 35 | */ 36 | public function isEmpty(): bool 37 | { 38 | return empty($this->store); 39 | } 40 | 41 | /** 42 | * Empty the Store 43 | * 44 | * @return void 45 | */ 46 | public function reset() 47 | { 48 | $this->store = []; 49 | } 50 | 51 | /** 52 | * Serialize the Events Store 53 | * 54 | * @return array 55 | */ 56 | public function jsonSerialize(): array 57 | { 58 | return $this->store; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Stores/TransactionsStore.php: -------------------------------------------------------------------------------- 1 | getTransactionName(); 27 | 28 | // Do not override the 29 | if (isset($this->store[$name]) === true) { 30 | throw new DuplicateTransactionNameException($name); 31 | } 32 | 33 | // Push to Store 34 | $this->store[$name] = $transaction; 35 | } 36 | 37 | /** 38 | * Fetch a Transaction from the Store 39 | * 40 | * @param final string $name 41 | * 42 | * @return mixed: \Nipwaayoni\Events\Transaction | null 43 | */ 44 | public function fetch(string $name) 45 | { 46 | return $this->store[$name] ?? null; 47 | } 48 | 49 | /** 50 | * Serialize the Transactions Events Store 51 | * 52 | * @return array 53 | */ 54 | public function jsonSerialize(): array 55 | { 56 | return array_values($this->store); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Traits/Events/Stacktrace.php: -------------------------------------------------------------------------------- 1 | getDebugBacktrace($limit)); 20 | } 21 | 22 | /** 23 | * Function to convert debug_backtrace results to an array of stack frames 24 | * 25 | * @param int $limit 26 | * 27 | * @return array 28 | */ 29 | protected function getDebugBacktrace(int $limit): array 30 | { 31 | $traces = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, $limit); 32 | for ($it = 1; $it < count($traces); $it++) { 33 | if (isset($traces[$it]['file']) === true) { 34 | $backtrace[] = [ 35 | 'abs_path' => $traces[$it]['file'], 36 | 'filename' => basename($traces[$it]['file']), 37 | 'function' => $traces[$it]['function'] ?? null, 38 | 'lineno' => $traces[$it]['line'] ?? null, 39 | 'module' => $traces[$it]['class'] ?? null, 40 | 'vars' => $traces[$it]['args'] ?? null, 41 | ]; 42 | } 43 | } 44 | 45 | return $backtrace; 46 | } 47 | } 48 | --------------------------------------------------------------------------------