Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing const qualifiers in sentry tracing #832

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,8 @@ SENTRY_EXPERIMENTAL_API void sentry_set_span(sentry_span_t *span);
* in a thread-safe way.
*/
SENTRY_EXPERIMENTAL_API sentry_span_t *sentry_transaction_start_child(
sentry_transaction_t *parent, char *operation, char *description);
sentry_transaction_t *parent, const char *operation,
const char *description);

/**
* Starts a new Span.
Expand Down Expand Up @@ -1651,7 +1652,7 @@ SENTRY_EXPERIMENTAL_API sentry_span_t *sentry_transaction_start_child(
* in a thread-safe way.
*/
SENTRY_EXPERIMENTAL_API sentry_span_t *sentry_span_start_child(
sentry_span_t *parent, char *operation, char *description);
sentry_span_t *parent, const char *operation, const char *description);

/**
* Finishes a Span.
Expand Down
8 changes: 4 additions & 4 deletions src/sentry_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,8 @@ sentry_set_span(sentry_span_t *span)
}

sentry_span_t *
sentry_transaction_start_child(
sentry_transaction_t *opaque_parent, char *operation, char *description)
sentry_transaction_start_child(sentry_transaction_t *opaque_parent,
const char *operation, const char *description)
{
if (!opaque_parent || sentry_value_is_null(opaque_parent->inner)) {
SENTRY_DEBUG("no transaction available to create a child under");
Expand All @@ -892,8 +892,8 @@ sentry_transaction_start_child(
}

sentry_span_t *
sentry_span_start_child(
sentry_span_t *opaque_parent, char *operation, char *description)
sentry_span_start_child(sentry_span_t *opaque_parent, const char *operation,
const char *description)
{
if (!opaque_parent || sentry_value_is_null(opaque_parent->inner)) {
SENTRY_DEBUG("no parent span available to create a child span under");
Expand Down
4 changes: 2 additions & 2 deletions src/sentry_tracing.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ sentry__span_new(sentry_transaction_t *tx, sentry_value_t inner)
}

sentry_value_t
sentry__value_span_new(
size_t max_spans, sentry_value_t parent, char *operation, char *description)
sentry__value_span_new(size_t max_spans, sentry_value_t parent,
const char *operation, const char *description)
{
if (!sentry_value_is_null(sentry_value_get_by_key(parent, "timestamp"))) {
SENTRY_DEBUG("span's parent is already finished, not creating span");
Expand Down
2 changes: 1 addition & 1 deletion src/sentry_tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void sentry__span_incref(sentry_span_t *span);
void sentry__span_decref(sentry_span_t *span);

sentry_value_t sentry__value_span_new(size_t max_spans, sentry_value_t parent,
char *operation, char *description);
const char *operation, const char *description);
sentry_span_t *sentry__span_new(
sentry_transaction_t *parent_tx, sentry_value_t inner);

Expand Down