Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing protobuf generation and InstrumentationScope #665

Merged
merged 5 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,12 @@
// your application should be included in this list.
'directory_list' => [
'src',
'proto',
'proto/otel/GPBMetadata',
'proto/otel/Opentelemetry',
'thrift',
'vendor/packaged/thrift',
'vendor/composer',
'vendor/grpc/grpc/src/lib',
'vendor/guzzlehttp',
'vendor/psr',
'vendor/php-http',
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ psalm:
psalm-info:
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/psalm --show-info=true --threads=1
phpstan:
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/phpstan analyse
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/phpstan analyse --memory-limit=256M
benchmark:
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/phpbench run --report=default
phpmetrics:
Expand All @@ -39,9 +39,9 @@ trace examples: FORCE
docker-compose run -e NEW_RELIC_ENDPOINT -e NEW_RELIC_INSERT_KEY --rm php php ./examples/AlwaysOnZipkinToNewrelicExample.php
docker-compose stop
collector:
docker-compose -f docker-compose-collector.yaml up -d --remove-orphans
docker-compose -f docker-compose-collector.yaml run -e OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector:4317 --rm php php ./examples/AlwaysOnOTLPGrpcExample2.php
docker-compose -f docker-compose-collector.yaml stop
docker-compose -f docker-compose.collector.yaml up -d --remove-orphans
docker-compose -f docker-compose.collector.yaml run -e OTEL_EXPORTER_OTLP_ENDPOINT=collector:4317 --rm php php ./examples/AlwaysOnOTLPGrpcExample.php
docker-compose -f docker-compose.collector.yaml stop

fiber-ffi-example:
@docker-compose -f docker-compose.fiber-ffi.yaml -p opentelemetry-php_fiber-ffi-example up -d web
Expand All @@ -51,7 +51,7 @@ metrics-prometheus-example:
stop-prometheus:
@docker-compose -f docker-compose.prometheus.yaml -p opentelemetry-php_metrics-prometheus-example stop
protobuf:
@docker-compose -f docker-compose.proto.yaml up proto
./script/proto_gen.sh
thrift:
./script/thrift_gen.sh
bash:
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ To generate protobuf files for use with this repository, you can run the followi
make protobuf
```

Change into the root of this directory. This will create a `/proto` folder in the root
directory of the
repository.
This will replace `proto/otel/Opentelemetry` and `proto/otel/GPBMetadata` with freshly generated code based on the latest
tag from `opentelemetry-proto`, which can then be committed.


## Semantic Conventions Generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
volumes:
- ./:/usr/src/myapp
depends_on:
- otel-collector
- collector
zipkin:
image: openzipkin/zipkin-slim
ports:
Expand All @@ -19,8 +19,7 @@ services:
ports:
- 9412:9412
- 16686:16686
otel-collector:
platform: linux/amd64
collector:
image: otel/opentelemetry-collector-contrib
command: ["--config=/etc/otel-collector-config.yml"]
volumes:
Expand Down
7 changes: 0 additions & 7 deletions docker-compose.proto.yaml

This file was deleted.

1 change: 1 addition & 0 deletions proto/otel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opentelemetry-proto
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified proto/otel/GPBMetadata/Opentelemetry/Proto/Logs/V1/Logs.php
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function __construct($hostname, $opts, $channel = null) {
* @param \Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function Export(\Opentelemetry\Proto\Collector\Logs\V1\ExportLogsServiceRequest $argument,
$metadata = [], $options = []) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function __construct($hostname, $opts, $channel = null) {
* @param \Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function Export(\Opentelemetry\Proto\Collector\Metrics\V1\ExportMetricsServiceRequest $argument,
$metadata = [], $options = []) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function __construct($hostname, $opts, $channel = null) {
* @param \Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function Export(\Opentelemetry\Proto\Collector\Trace\V1\ExportTraceServiceRequest $argument,
$metadata = [], $options = []) {
Expand Down
39 changes: 37 additions & 2 deletions proto/otel/Opentelemetry/Proto/Common/V1/AnyValue.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading