Skip to content

Commit

Permalink
refactor(dynatrace): [TR-1498] Remove redundant check for token exist…
Browse files Browse the repository at this point in the history
…ence

Signed-off-by: Mario Kahlhofer <[email protected]>
  • Loading branch information
blu3r4y authored and poiana committed Aug 2, 2023
1 parent eda39a1 commit aa85c79
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions outputs/dynatrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,9 @@ func (c *Client) DynatracePost(falcopayload types.FalcoPayload) {

c.ContentType = DynatraceContentType

if c.Config.Dynatrace.APIToken != "" {
c.httpClientLock.Lock()
defer c.httpClientLock.Unlock()
c.AddHeader("Authorization", "Api-Token "+c.Config.Dynatrace.APIToken)
}
c.httpClientLock.Lock()
defer c.httpClientLock.Unlock()
c.AddHeader("Authorization", "Api-Token "+c.Config.Dynatrace.APIToken)

err := c.Post(newDynatracePayload(falcopayload).Payload)
if err != nil {
Expand Down

0 comments on commit aa85c79

Please sign in to comment.