Skip to content

Missing const qualifiers in sentry tracing #831

@vitekcerny

Description

@vitekcerny

Description

Following functions missing const qualifiers in their parameters:

sentry.h:

  • sentry_transaction_start_child
  • sentry_span_start_child

sentry_tracing.h:

  • sentry__value_span_new

Because of that, I can't call these functions with string literals, for example:
sentry_transaction_start_child(parent, "operation", "description");

I have looked into the sources and there doesn't seem to be a reason to mutate the original char* sequences (and therefore omit the const).
I also created a pull request for this issue: #832

When does the problem happen

  • During build
  • During run-time
  • When capturing a hard crash

Environment

  • OS: Windows 10, 64-bit
  • Compiler: MSVC 22
  • CMake version and config: 3.26.3, SENTRY_BACKEND=inproc

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions