Other methods instead have the Option varargs to configure it. For example with this one:
func WithObservabilityService(service ObservabilityService) Option { return func(i interface{}) error { if c, ok := i.(*ceClient); ok { c.observabilityService = service c.inboundContextDecorators = append(c.inboundContextDecorators, service.InboundContextDecorators()...) } return nil } }
Can WithObservabilityService be made available in the NewHTTPReceiveHandler method?
When you invoke the NewHTTPReceiveHandler method, a noopObservabilityService is set by default, and you cannot change it.
`func NewHTTPReceiveHandler(ctx context.Context, p thttp.Protocol, fn interface{}) (EventReceiver, error) { invoker, err := newReceiveInvoker(fn, noopObservabilityService{}, nil, nil, false) //TODO(slinkydeveloper) maybe not nil? if err != nil { return nil, err }
}`
Other methods instead have the Option varargs to configure it. For example with this one:
func WithObservabilityService(service ObservabilityService) Option { return func(i interface{}) error { if c, ok := i.(*ceClient); ok { c.observabilityService = service c.inboundContextDecorators = append(c.inboundContextDecorators, service.InboundContextDecorators()...) } return nil } }
Can WithObservabilityService be made available in the NewHTTPReceiveHandler method?