Skip to content

Tag based functionality not added when using a spanner connection #712

@sdahps

Description

@sdahps

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

  1. Use a spanner connection when setting up EF
  2. Use WithRequestTag extension
  3. Check whether spanner tag was applied
  4. Making sure to follow these steps will guarantee the quickest resolution possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions