Skip to content

Commit 66d1a18

Browse files
committed
Merge branch 'main' into fix_issues
2 parents 2a15d9d + 2d17302 commit 66d1a18

File tree

105 files changed

+4867
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+4867
-326
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ build: ## Build image
1919
install: ## Install dependencies
2020
$(DC_RUN_PHP) env XDEBUG_MODE=off composer install
2121
update: ## Update dependencies
22-
$(DC_RUN_PHP) env XDEBUG_MODE=off composer update
22+
$(DC_RUN_PHP) env XDEBUG_MODE=off composer update --no-plugins
2323
update-lowest: ## Update dependencies to lowest supported versions
24-
$(DC_RUN_PHP) env XDEBUG_MODE=off composer update --prefer-lowest
24+
$(DC_RUN_PHP) env XDEBUG_MODE=off composer update --no-plugins --prefer-lowest
2525
test: ## Run all tests
2626
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/phpunit --testdox --colors=always
2727
test-unit: ## Run unit tests
@@ -39,7 +39,7 @@ psalm-info: ## Run psalm with info
3939
phpstan: ## Run phpstan
4040
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/phpstan analyse --memory-limit=256M
4141
validate: ## Validate composer file
42-
$(DC_RUN_PHP) env XDEBUG_MODE=off composer validate
42+
$(DC_RUN_PHP) env XDEBUG_MODE=off composer validate --no-plugins
4343
packages-composer: ## Validate all composer packages
4444
$(DC_RUN) php env XDEBUG_MODE=off vendor/bin/otel packages:composer:validate
4545
bash: ## Bash shell

src/Instrumentation/CakePHP/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"ext-opentelemetry": "*",
1414
"cakephp/cakephp": "^4 || ^5",
1515
"open-telemetry/api": "^1.0",
16-
"open-telemetry/sem-conv": "^1.24"
16+
"open-telemetry/sem-conv": "^1.30"
1717
},
1818
"require-dev": {
1919
"friendsofphp/php-cs-fixer": "^3",

src/Instrumentation/CakePHP/src/CakePHPInstrumentation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static function register(): void
1818
$instrumentation = new CachedInstrumentation(
1919
'io.opentelemetry.contrib.php.cakephp',
2020
null,
21-
'https://opentelemetry.io/schemas/1.24.0'
21+
'https://opentelemetry.io/schemas/1.30.0',
2222
);
2323
Server::hook($instrumentation);
2424
Controller::hook($instrumentation);

src/Instrumentation/CakePHP/src/Hooks/Cake/Command/Command.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ public function instrument(): void
5252
$span = Span::fromContext($scope->context());
5353

5454
if ($exception) {
55-
$span->recordException($exception, [
56-
TraceAttributes::EXCEPTION_ESCAPED => true,
57-
]);
55+
$span->recordException($exception);
5856
$span->setStatus(StatusCode::STATUS_ERROR, $exception->getMessage());
5957
}
6058

src/Instrumentation/CakePHP/src/Hooks/Cake/Controller/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function instrument(): void
3535
$scope->detach();
3636
$span = \OpenTelemetry\API\Trace\Span::fromContext($scope->context());
3737
if ($exception) {
38-
$span->recordException($exception, [TraceAttributes::EXCEPTION_ESCAPED => true]);
38+
$span->recordException($exception);
3939
$span->setStatus(StatusCode::STATUS_ERROR, $exception->getMessage());
4040
}
4141
$response = $app->getResponse();

src/Instrumentation/CakePHP/src/Hooks/Cake/Http/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function instrument(): void
4949
$span->setAttribute(TraceAttributes::HTTP_ROUTE, $route);
5050
}
5151
if ($exception) {
52-
$span->recordException($exception, [TraceAttributes::EXCEPTION_ESCAPED => true]);
52+
$span->recordException($exception);
5353
$span->setStatus(StatusCode::STATUS_ERROR, $exception->getMessage());
5454
}
5555
if ($response) {

src/Instrumentation/CakePHP/tests/Integration/CakePHPInstrumentationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function test_index(): void
5858
$this->assertSame(SpanKind::KIND_INTERNAL, $controllerSpan->getKind());
5959
$this->assertGreaterThan(0, $controllerSpan->getAttributes()->count());
6060
$attributes = $controllerSpan->getAttributes()->toArray();
61-
$this->assertSame('invokeAction', $attributes['code.function']);
61+
$this->assertSame('invokeAction', $attributes['code.function.name']);
6262
$this->assertSame($serverSpan->getTraceId(), $controllerSpan->getParentContext()->getTraceId());
6363
$this->assertSame($serverSpan->getSpanId(), $controllerSpan->getParentContext()->getSpanId());
6464
}

src/Instrumentation/CakePHP/tests/Integration/CommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class CommandTest extends TestCase
1212

1313
public function test_command_tracing(): void
1414
{
15+
if (PHP_VERSION_ID < 80100) {
16+
$this->markTestSkipped();
17+
}
1518
$this->assertCount(0, $this->storage);
1619

1720
$this->exec('dummy');

src/Instrumentation/CodeIgniter/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"ext-opentelemetry": "*",
1414
"codeigniter4/framework": "^4.3",
1515
"open-telemetry/api": "^1.0",
16-
"open-telemetry/sem-conv": "^1.24"
16+
"open-telemetry/sem-conv": "^1.30"
1717
},
1818
"require-dev": {
1919
"friendsofphp/php-cs-fixer": "^3.50",

src/Instrumentation/CodeIgniter/src/CodeIgniterInstrumentation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function register(): void
2727
$instrumentation = new CachedInstrumentation(
2828
'io.opentelemetry.contrib.php.codeigniter',
2929
null,
30-
'https://opentelemetry.io/schemas/1.24.0'
30+
'https://opentelemetry.io/schemas/1.30.0',
3131
);
3232

3333
// The method that creates request/response/controller objects is in the same class as the method
@@ -151,7 +151,7 @@ public static function register(): void
151151
}
152152

153153
if ($exception) {
154-
$span->recordException($exception, [TraceAttributes::EXCEPTION_ESCAPED => true]);
154+
$span->recordException($exception);
155155
$span->setStatus(StatusCode::STATUS_ERROR, $exception->getMessage());
156156
}
157157

0 commit comments

Comments
 (0)