-
Notifications
You must be signed in to change notification settings - Fork 193
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
Transport - move contentType
from ::send()
argument to transport property
#831
Conversation
- move content type from `::send()` to transport property - move otlp exporter to `Otlp\` namespace
@@ -20,8 +20,16 @@ | |||
|
|||
final class GrpcTransportFactory implements TransportFactoryInterface | |||
{ | |||
/** | |||
* @psalm-param "application/x-protobuf" $contentType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't find a solution that works with template type on TransportFactoryInterface
.
@@ -12,16 +12,14 @@ | |||
*/ | |||
interface SpanExporterInterface | |||
{ | |||
public static function fromConnectionString(string $endpointUrl, string $name, string $args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use a SpanExporterFactoryInterface
instead to allow injecting dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable thing to do.
contentType
from ::send()
argument to transport property
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #831 +/- ##
============================================
- Coverage 82.54% 81.50% -1.05%
- Complexity 1877 1894 +17
============================================
Files 232 234 +2
Lines 4893 4919 +26
============================================
- Hits 4039 4009 -30
- Misses 854 910 +56
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Move content type from
::send()
argument to property.Also adds OTLP exporters that support protobuf and json format, based on the
::contentType()
of the provided transport.