When using the library with a connection string it adds in two interceptors that are used to add a tag to underling commands among other things:
|
spannerOptionsAction?.Invoke(new SpannerDbContextOptionsBuilder(optionsBuilder)); |
However if we use a spanner connection directly these interceptors aren't added in, meaning this functionality doesn't work:
|
optionsBuilder.AddInterceptors(TimestampBoundHintCommandInterceptor.TimestampBoundHintInterceptor); |
|
optionsBuilder.AddInterceptors(TagHintCommandInterceptor.TagHintInterceptor); |
Environment details
- Programming language: C#
- OS:
- Language runtime version: dotnet 10
- Package version: 3.10.0 / 4.0.0
Steps to reproduce
- Use a spanner connection when setting up EF
- Use
WithRequestTag extension
- Check whether spanner tag was applied
- Making sure to follow these steps will guarantee the quickest resolution possible.
When using the library with a connection string it adds in two interceptors that are used to add a tag to underling commands among other things:
dotnet-spanner-entity-framework/Google.Cloud.EntityFrameworkCore.Spanner/Extensions/SpannerDbContextOptionsExtensions.cs
Line 123 in 8ef23f3
However if we use a spanner connection directly these interceptors aren't added in, meaning this functionality doesn't work:
dotnet-spanner-entity-framework/Google.Cloud.EntityFrameworkCore.Spanner/Extensions/SpannerDbContextOptionsExtensions.cs
Lines 80 to 81 in 8ef23f3
Environment details
Steps to reproduce
WithRequestTagextension