Skip to content

Commit 721f9b8

Browse files
authored
Merge branch 'open-telemetry:main' into main
2 parents 91f483d + c15360b commit 721f9b8

32 files changed

+1697
-36
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ updates:
8282
- "/src/Instrumentation/Psr18"
8383
- "/src/Instrumentation/Psr3"
8484
- "/src/Instrumentation/Psr6"
85+
- "/src/Instrumentation/ReactPHP"
8586
- "/src/Instrumentation/Slim"
8687
- "/src/Instrumentation/Symfony"
8788
- "/src/Instrumentation/Wordpress"

.github/workflows/fossa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

17-
- uses: fossas/fossa-action@c0a7d013f84c8ee5e910593186598625513cc1e4 # v1.6.0
17+
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
1818
with:
1919
api-key: ${{secrets.FOSSA_API_KEY}}
2020
team: OpenTelemetry

.github/workflows/ossf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
persist-credentials: false
2525

26-
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
26+
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
2727
with:
2828
results_file: results.sarif
2929
results_format: sarif
@@ -42,6 +42,6 @@ jobs:
4242
# Upload the results to GitHub's code scanning dashboard (optional).
4343
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4444
- name: "Upload to code-scanning"
45-
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
45+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
4646
with:
4747
sarif_file: results.sarif

.github/workflows/php.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
'Instrumentation/Psr15',
4444
'Instrumentation/Psr16',
4545
'Instrumentation/Psr18',
46+
'Instrumentation/ReactPHP',
4647
'Instrumentation/Slim',
4748
'Instrumentation/Symfony',
4849
'Instrumentation/Yii',

.gitsplit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ splits:
4848
target: "https://${GH_TOKEN}@github.com/opentelemetry-php/contrib-auto-psr16.git"
4949
- prefix: "src/Instrumentation/Psr18"
5050
target: "https://${GH_TOKEN}@github.com/opentelemetry-php/contrib-auto-psr18.git"
51+
- prefix: "src/Instrumentation/ReactPHP"
52+
target: "https://${GH_TOKEN}@github.com/opentelemetry-php/contrib-auto-reactphp.git"
5153
- prefix: "src/Instrumentation/Slim"
5254
target: "https://${GH_TOKEN}@github.com/opentelemetry-php/contrib-auto-slim.git"
5355
- prefix: "src/Instrumentation/Symfony"

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"OpenTelemetry\\Contrib\\Instrumentation\\Psr3\\": "src/Instrumentation/Psr3/src",
3030
"OpenTelemetry\\Contrib\\Instrumentation\\Psr15\\": "src/Instrumentation/Psr15/src",
3131
"OpenTelemetry\\Contrib\\Instrumentation\\Psr18\\": "src/Instrumentation/Psr18/src",
32+
"OpenTelemetry\\Contrib\\Instrumentation\\ReactPHP\\": "src/Instrumentation/ReactPHP/src",
3233
"OpenTelemetry\\Contrib\\Instrumentation\\Slim\\": "src/Instrumentation/Slim/src",
3334
"OpenTelemetry\\Contrib\\Instrumentation\\Symfony\\": "src/Instrumentation/Symfony/src",
3435
"OpenTelemetry\\Contrib\\Instrumentation\\Wordpress\\": "src/Instrumentation/Wordpress/src",
@@ -54,6 +55,7 @@
5455
"src/Instrumentation/Psr3/_register.php",
5556
"src/Instrumentation/Psr15/_register.php",
5657
"src/Instrumentation/Psr18/_register.php",
58+
"src/Instrumentation/ReactPHP/_register.php",
5759
"src/Instrumentation/Slim/_register.php",
5860
"src/Instrumentation/Symfony/_register.php",
5961
"src/Instrumentation/Wordpress/_register.php",
@@ -80,6 +82,7 @@
8082
"open-telemetry/opentelemetry-auto-psr3": "self.version",
8183
"open-telemetry/opentelemetry-auto-psr15": "self.version",
8284
"open-telemetry/opentelemetry-auto-psr18": "self.version",
85+
"open-telemetry/opentelemetry-auto-reactphp": "self.version",
8386
"open-telemetry/opentelemetry-auto-slim": "self.version",
8487
"open-telemetry/opentelemetry-auto-symfony": "self.version",
8588
"open-telemetry/opentelemetry-auto-wordpress": "self.version",

src/Instrumentation/OpenAIPHP/src/OpenAIPHPInstrumentation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private static function hookApi(CachedInstrumentation $instrumentation, $class,
193193

194194
private static function recordUsage(SpanInterface $span, object $response, ContextInterface $context)
195195
{
196-
if (!property_exists($response, 'usage') || !method_exists($response->usage, 'toArray')) {
196+
if (!property_exists($response, 'usage') || !isset($response->usage) || !method_exists($response->usage, 'toArray')) {
197197
return;
198198
}
199199

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* text=auto
2+
3+
*.md diff=markdown
4+
*.php diff=php
5+
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.phan export-ignore
9+
/.php-cs-fixer.php export-ignore
10+
/examples export-ignore
11+
/phpstan.neon.dist export-ignore
12+
/phpunit.xml.dist export-ignore
13+
/psalm.xml.dist export-ignore
14+
/tests export-ignore
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor/

0 commit comments

Comments
 (0)