-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Feature description
In datadog_dio, it would be great to export the DatadogDioInterceptor and not make it basically internal.
addDatadogInterceptor adds the DatadogDioInterceptor as first in the list of interceptors.
In our system, having the DatadogDioInterceptor as first in the list of interceptors doesn't work because we have another interceptor that builds the correct host based on the environment, user, etc...
If the DatadogDioInterceptor is the first, we don't yet have the host (as it will be added by a different interceptor later in the list of interceptors), and therefore the DatadogDioInterceptor will not "match" the requests as requests going to the first party host.
Proposed solution
In datadog_dio, it would be great to export the DatadogDioInterceptor so that it can be used freely (at any position in the list of interceptors as needed).
Other relevant information
I understand there are workarounds, for example, we could insert those other interceptors at position 0, or we can import 'package:datadog_dio/src/datadog_dio_interceptor.dart';, but these options feel like jumping through hoops, so I thought I'd ask you what you think about exporting the interceptor itself.