Skip to content

Commit

Permalink
Merge pull request #1 from zoilomora/update-to-7.8
Browse files Browse the repository at this point in the history
Update to Elastic v7.8.1
  • Loading branch information
zoilomora authored Dec 16, 2020
2 parents bef5d83 + c47332c commit 6aa175d
Show file tree
Hide file tree
Showing 32 changed files with 819 additions and 24 deletions.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ Thumbs.db
# Mac DS_Store Files
.DS_Store

/report/
# Docker Compose
docker-compose.override.yml

# PHP Composer
/vendor/
/var
composer.lock

# PHPUnit
/report/
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ I couldn't find an [official APM Agent] for PHP.
I have searched for unofficial options but I have not found any with backwards compatibility of PHP version (>= 5.4).
I know [PHP 5.4] is very old (01 Mar 2012) but today there is still code working even with older versions.

I wanted to make it as easy as possible to develop new microservices and also to make it possible to help legacy code refactors be easier to accomplish.
I wanted to make it as easy as possible to develop new services and also to make it possible to help legacy code refactors be easier to accomplish.

I have based myself on the official [API reference of version 7.7].
I have based myself on the official [API reference of version 7.8.1].

## Installation

Expand Down Expand Up @@ -68,6 +68,29 @@ If you are using **Kubernetes**, it is recommended that you use the [official en
- [Basic Usage](docs/examples/basic-usage.md)
- [Distributed Tracing](docs/examples/distributed-tracing.md)

## Examples of packages that use this Agent

**Custom reports**
- [PcComponentes/apm-redis-reporter](https://github.com/PcComponentes/apm-redis-reporter)

**Transaction Wrappers**
- [PcComponentes/apm-symfony-console](https://github.com/PcComponentes/apm-symfony-console)
- [PcComponentes/apm-symfony-http-kernel](https://github.com/PcComponentes/apm-symfony-http-kernel)
- [PcComponentes/apm-symfony-messenger](https://github.com/PcComponentes/apm-symfony-messenger)

**HTTP Clients**
- [PcComponentes/apm-symfony-http-client](https://github.com/PcComponentes/apm-symfony-http-client)
- [PcComponentes/apm-guzzle](https://github.com/PcComponentes/apm-guzzle)

**Databases**
- [PcComponentes/apm-doctrine-dbal](https://github.com/PcComponentes/apm-doctrine-dbal)
- [PcComponentes/apm-mongodb](https://github.com/PcComponentes/apm-mongodb)
- [PcComponentes/apm-predis](https://github.com/PcComponentes/apm-predis)

**Others**
- [PcComponentes/apm-twig](https://github.com/PcComponentes/apm-twig)
- [PcComponentes/apm-dompdf](https://github.com/PcComponentes/apm-dompdf)

## Documentation used for development

- [Building an agent](https://github.com/elastic/apm/blob/master/docs/agents/agent-development.md)
Expand All @@ -85,10 +108,10 @@ Read [LICENSE](LICENSE) for more information
[link-author]: https://github.com/zoilomora
[link-contributors]: https://github.com/zoilomora/elastic-apm-agent-php/contributors

[Intake API v2]: https://www.elastic.co/guide/en/apm/server/7.7/intake-api.html
[Intake API v2]: https://www.elastic.co/guide/en/apm/server/7.8/intake-api.html
[Elastic APM]: https://www.elastic.co/apm
[official APM Agent]: https://www.elastic.co/guide/en/apm/agent/index.html
[PHP 5.4]: https://www.php.net/ChangeLog-5.php#5.4.0
[API reference of version 7.7]: https://github.com/elastic/apm-server/tree/2ad1c15aa2d1c364b92d2fb8e45cfe7b5a0ff317/docs/spec
[API reference of version 7.8.1]: https://github.com/elastic/apm-server/tree/ce6c49cecba96b45e0a3c1c64c6a874336416185/docs/spec
[composer]: https://getcomposer.org/
[official environment variables]: https://www.elastic.co/guide/en/apm/server/master/metadata-api.html#kubernetes-data
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- ~/.composer:/.composer

apm-server:
image: docker.elastic.co/apm/apm-server:7.7.1
image: docker.elastic.co/apm/apm-server:7.8.1
depends_on:
- elasticsearch
- kibana
Expand All @@ -33,7 +33,7 @@ services:


elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.1
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
environment:
- bootstrap.memory_lock=true
- cluster.name=docker-cluster
Expand All @@ -54,7 +54,7 @@ services:
test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'

kibana:
image: docker.elastic.co/kibana/kibana:7.7.1
image: docker.elastic.co/kibana/kibana:7.8.1
depends_on:
- elasticsearch
environment:
Expand Down
74 changes: 74 additions & 0 deletions schemas/apm-server/docs/spec/cloud.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"$id": "docs/spec/cloud.json",
"title": "Cloud",
"type": ["object", "null"],
"properties": {
"account": {
"properties": {
"id" : {
"description": "Cloud account ID",
"type": ["string"],
"maxLength": 1024
},
"name" : {
"description": "Cloud account name",
"type": ["string"],
"maxLength": 1024
}
}
},
"availability_zone": {
"description": "Cloud availability zone name. e.g. us-east-1a",
"type": ["string", "null"],
"maxLength": 1024
},
"instance": {
"properties": {
"id" : {
"description": "Cloud instance/machine ID",
"type": ["string"],
"maxLength": 1024
},
"name" : {
"description": "Cloud instance/machine name",
"type": ["string"],
"maxLength": 1024
}
}
},
"machine": {
"properties": {
"type" : {
"description": "Cloud instance/machine type",
"type": ["string"],
"maxLength": 1024
}
}
},
"project": {
"properties": {
"id" : {
"description": "Cloud project ID",
"type": ["string"],
"maxLength": 1024
},
"name" : {
"description": "Cloud project name",
"type": ["string"],
"maxLength": 1024
}
}
},
"provider": {
"description": "Cloud provider name. e.g. aws, azure, gcp, digitalocean.",
"type": ["string", "null"],
"maxLength": 1024
},
"region": {
"description": "Cloud region name. e.g. us-east-1",
"type": ["string", "null"],
"maxLength": 1024
}
},
"required": ["provider"]
}
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/context.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/context.json",
"$id": "docs/spec/context.json",
"title": "Context",
"description": "Any arbitrary contextual information regarding the event, captured by the agent, optionally provided by the user",
"type": ["object", "null"],
Expand Down
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/http_response.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/http_response.json",
"$id": "docs/spec/http_response.json",
"title": "HTTP response object",
"description": "HTTP response object, used by error, span and transction documents",
"type": ["object", "null"],
Expand Down
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/message.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/message.json",
"$id": "docs/spec/message.json",
"title": "Message",
"description": "Details related to message receiving and publishing if the captured event integrates with a messaging system",
"type": ["object", "null"],
Expand Down
5 changes: 4 additions & 1 deletion schemas/apm-server/docs/spec/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/metadata.json",
"$id": "docs/spec/metadata.json",
"title": "Metadata",
"description": "Metadata concerning the other objects in the stream.",
"type": ["object"],
Expand Down Expand Up @@ -29,6 +29,9 @@
"description": "Describes the authenticated User for a request.",
"$ref": "user.json"
},
"cloud": {
"$ref": "cloud.json"
},
"labels": {
"$ref": "tags.json"
}
Expand Down
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/process.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/process.json",
"$id": "docs/spec/process.json",
"title": "Process",
"type": ["object", "null"],
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/request.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "docs/spec/http.json",
"$id": "docs/spec/request.json",
"title": "Request",
"description": "If a log record was generated as a result of a http request, the http interface can be used to collect this information.",
"type": ["object", "null"],
Expand Down
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/service.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/service.json",
"$id": "docs/spec/service.json",
"title": "Service",
"type": ["object", "null"],
"properties": {
Expand Down
13 changes: 12 additions & 1 deletion schemas/apm-server/docs/spec/spans/span.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
"type": "string",
"maxLength": 1024
},
"child_ids": {
"description": "List of successor transactions and/or spans.",
"type": ["array", "null"],
"minItems": 0,
"maxLength": 1024,
"items": {
"type": "string",
"maxLength": 1024
}
},
"start": {
"type": ["number", "null"],
"description": "Offset relative to the transaction's timestamp identifying the start of the span, in milliseconds"
Expand Down Expand Up @@ -185,7 +195,8 @@
},
"duration": {
"type": "number",
"description": "Duration of the span in milliseconds"
"description": "Duration of the span in milliseconds",
"minimum": 0
},
"name": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/system.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/system.json",
"$id": "docs/spec/system.json",
"title": "System",
"type": ["object", "null"],
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/tags.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/tags.json",
"$id": "docs/spec/tags.json",
"title": "Tags",
"type": ["object", "null"],
"description": "A flat mapping of user-defined tags with string, boolean or number values.",
Expand Down
4 changes: 2 additions & 2 deletions schemas/apm-server/docs/spec/timestamp_epoch.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$id": "doc/spec/timestamp_epoch.json",
"$id": "docs/spec/timestamp_epoch.json",
"title": "Timestamp Epoch",
"description": "Object with 'timestamp' property.",
"type": ["object"],
"properties": {
"properties": {
"timestamp": {
"description": "Recorded time of the event, UTC based and formatted as microseconds since Unix epoch",
"type": ["integer", "null"]
Expand Down
2 changes: 1 addition & 1 deletion schemas/apm-server/docs/spec/timestamp_rfc3339.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "doc/spec/timestamp_rfc3339.json",
"$id": "docs/spec/timestamp_rfc3339.json",
"title": "Timestamp",
"description": "Used for '@timestamp' property.",
"type": ["object"],
Expand Down
3 changes: 2 additions & 1 deletion schemas/apm-server/docs/spec/transactions/transaction.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
},
"duration": {
"type": "number",
"description": "How long the transaction took to complete, in ms with 3 decimal points"
"description": "How long the transaction took to complete, in ms with 3 decimal points",
"minimum": 0
},
"result": {
"type": ["string", "null"],
Expand Down
Loading

0 comments on commit 6aa175d

Please sign in to comment.