Hi,
I try to set new/existing tag to the Sentry, but it doesn't work. See code below:
Second question: Is it possible to set environment property. I see that I always get "production" value. Is it hardcoded inside TWebSentry?
procedure TdmWebModule.initSentry;
begin
if(SentryEnabled) then
begin
wbsntrySentry.SetTag('testtag','testtagvalue');
wbsntrySentry.DSN := SentryDSN;
wbsntrySentry.Release := 'Test Release';
wbsntrySentry.Init;
wbsntrySentry.Enabled := True;
end;
end;
Ok ... I see where was problem setTag I have to run when I send exception
dmWebModule.wbsntrySentry.SetTag('mytag','my tag value');
dmWebModule.wbsntrySentry.CaptureException(toObject(AError));
but second question is still problem ... I can't rewrite environment tag ... still is "production"
dmWebModule.wbsntrySentry.SetTag('environment','testenv');
dmWebModule.wbsntrySentry.CaptureException(toObject(AError));
We would need to extend the component to allow to set this also.
We will consider this.
1 Like
Maybe good idea will be add to the TWebSentry, support for the last Sentry version?
Currently I see that TWebSentry is working with Sentry 7.37.1 but e.g for the last Sentry version 8.33
<script src="https://browser.sentry-cdn.com/8.33.0/bundle.min.js" type="text/javascript"></script>
I got an error when I used the TWebSentry.setTag()
In the created js file it is this place.