exceptionless / Exceptionless.Net

Exceptionless clients for the .NET platform
https://exceptionless.com
Other
557 stars 142 forks source link

ExceptionlessTarget - ApiKey and ServerUrl and Message and UserIdentity with Layout support #299

Closed snakefoot closed 1 year ago

snakefoot commented 1 year ago

Resolves #297 and resolves #296

    <target type="Exceptionless, Exceptionless.NLog" name="exceptionless"
            apiKey="API_KEY_HERE"
            userIdentity="${aspnet-user-identity}"
            userIdentityName="${aspnet-user-claim:ClaimTypes.Name}">
      <field name="host" layout="${hostname}" />
      <field name="process" layout="${processname}" />
      <field name="user" layout="${environment-user}" />
    </target>

${aspnet-user-identity} comes from NLog.Web.AspNetCore-nuget-package . See also: https://nlog-project.org/config/?tab=layout-renderers

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

niemyjski commented 1 year ago

I left a comment. I don't think we can use reference id's like this because they will be discarded events server side as each event needs to be unique, can you please confirm.

@ejsmith may want to consider bringing correlation id in as it may help track down issues in otel. I'm not sure how well our event references we store in extended data for this scenario would help.

niemyjski commented 1 year ago

Thanks for the PR!!!!!!