newrelic_rpm 9.7.0 → 9.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -2
  3. data/README.md +1 -1
  4. data/lib/new_relic/agent/configuration/default_source.rb +37 -1
  5. data/lib/new_relic/agent/configuration/high_security_source.rb +1 -0
  6. data/lib/new_relic/agent/configuration/manager.rb +6 -3
  7. data/lib/new_relic/agent/configuration/security_policy_source.rb +11 -0
  8. data/lib/new_relic/agent/custom_event_aggregator.rb +27 -1
  9. data/lib/new_relic/agent/error_collector.rb +2 -0
  10. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/instrumentation.rb +7 -3
  11. data/lib/new_relic/agent/instrumentation/async_http.rb +3 -1
  12. data/lib/new_relic/agent/instrumentation/concurrent_ruby.rb +1 -0
  13. data/lib/new_relic/agent/instrumentation/grpc_server.rb +1 -1
  14. data/lib/new_relic/agent/instrumentation/net_http/instrumentation.rb +6 -0
  15. data/lib/new_relic/agent/instrumentation/ruby_openai/chain.rb +36 -0
  16. data/lib/new_relic/agent/instrumentation/ruby_openai/instrumentation.rb +197 -0
  17. data/lib/new_relic/agent/instrumentation/ruby_openai/prepend.rb +20 -0
  18. data/lib/new_relic/agent/instrumentation/ruby_openai.rb +35 -0
  19. data/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +2 -1
  20. data/lib/new_relic/agent/llm/chat_completion_message.rb +25 -0
  21. data/lib/new_relic/agent/llm/chat_completion_summary.rb +66 -0
  22. data/lib/new_relic/agent/llm/embedding.rb +60 -0
  23. data/lib/new_relic/agent/llm/llm_event.rb +95 -0
  24. data/lib/new_relic/agent/llm/response_headers.rb +80 -0
  25. data/lib/new_relic/agent/llm.rb +49 -0
  26. data/lib/new_relic/agent/threading/agent_thread.rb +1 -2
  27. data/lib/new_relic/agent/tracer.rb +5 -5
  28. data/lib/new_relic/agent/transaction/abstract_segment.rb +1 -1
  29. data/lib/new_relic/agent/transaction/tracing.rb +2 -2
  30. data/lib/new_relic/agent.rb +91 -0
  31. data/lib/new_relic/rack/browser_monitoring.rb +8 -4
  32. data/lib/new_relic/supportability_helper.rb +2 -0
  33. data/lib/new_relic/thread_local_storage.rb +31 -0
  34. data/lib/new_relic/version.rb +1 -1
  35. data/lib/tasks/instrumentation_generator/instrumentation.thor +1 -1
  36. data/lib/tasks/instrumentation_generator/templates/chain.tt +0 -1
  37. data/lib/tasks/instrumentation_generator/templates/chain_method.tt +0 -1
  38. data/newrelic.yml +21 -1
  39. metadata +13 -2
data/newrelic.yml CHANGED
@@ -33,6 +33,18 @@ common: &default_settings
33
33
  # - a.third.event
34
34
  # active_support_custom_events_names: []
35
35
 
36
+ # If false, all LLM instrumentation (OpenAI only for now) will be disabled and no
37
+ # metrics, events, or spans will be sent. AI Monitoring is automatically disabled
38
+ # if high_security mode is enabled.
39
+ # ai_monitoring.enabled: false
40
+
41
+ # If false, LLM instrumentation (OpenAI only for now) will not capture input and
42
+ # output content on specific LLM events.
43
+ # The excluded attributes include:
44
+ # * content from LlmChatCompletionMessage events
45
+ # * input from LlmEmbedding events
46
+ # ai_monitoring.record_content.enabled: true
47
+
36
48
  # If true, enables capture of all HTTP request headers for all destinations.
37
49
  # allow_all_headers: false
38
50
 
@@ -324,7 +336,8 @@ common: &default_settings
324
336
  # error_collector.ignore_status_codes: ""
325
337
 
326
338
  # Defines the maximum number of frames in an error backtrace. Backtraces over this
327
- # amount are truncated at the beginning and end.
339
+ # amount are truncated in the middle, preserving the beginning and the end of the
340
+ # stack trace.
328
341
  # error_collector.max_backtrace_frames: 50
329
342
 
330
343
  # Defines the maximum number of TransactionError events reported per harvest
@@ -509,6 +522,10 @@ common: &default_settings
509
522
  # chain, disabled.
510
523
  # instrumentation.roda: auto
511
524
 
525
+ # Controls auto-instrumentation of the ruby-openai gem at start-up. May be one of:
526
+ # auto, prepend, chain, disabled.
527
+ # instrumentation.ruby_openai: auto
528
+
512
529
  # Controls auto-instrumentation of Sinatra at start-up. May be one of: auto,
513
530
  # prepend, chain, disabled.
514
531
  # instrumentation.sinatra: auto
@@ -704,6 +721,9 @@ common: &default_settings
704
721
  # the New Relic agent has time to report.
705
722
  # sync_startup: false
706
723
 
724
+ # If true, tracer state storage is thread-local, otherwise, fiber-local
725
+ # thread_local_tracer_state: false
726
+
707
727
  # If true, enables use of the thread profiler.
708
728
  # thread_profiler.enabled: false
709
729
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.7.0
4
+ version: 9.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanna McClure
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-01-10 00:00:00.000000000 Z
14
+ date: 2024-03-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -480,6 +480,10 @@ files:
480
480
  - lib/new_relic/agent/instrumentation/roda/instrumentation.rb
481
481
  - lib/new_relic/agent/instrumentation/roda/prepend.rb
482
482
  - lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb
483
+ - lib/new_relic/agent/instrumentation/ruby_openai.rb
484
+ - lib/new_relic/agent/instrumentation/ruby_openai/chain.rb
485
+ - lib/new_relic/agent/instrumentation/ruby_openai/instrumentation.rb
486
+ - lib/new_relic/agent/instrumentation/ruby_openai/prepend.rb
483
487
  - lib/new_relic/agent/instrumentation/sequel.rb
484
488
  - lib/new_relic/agent/instrumentation/sequel_helper.rb
485
489
  - lib/new_relic/agent/instrumentation/sidekiq.rb
@@ -513,6 +517,12 @@ files:
513
517
  - lib/new_relic/agent/internal_agent_error.rb
514
518
  - lib/new_relic/agent/javascript_instrumentor.rb
515
519
  - lib/new_relic/agent/linking_metadata.rb
520
+ - lib/new_relic/agent/llm.rb
521
+ - lib/new_relic/agent/llm/chat_completion_message.rb
522
+ - lib/new_relic/agent/llm/chat_completion_summary.rb
523
+ - lib/new_relic/agent/llm/embedding.rb
524
+ - lib/new_relic/agent/llm/llm_event.rb
525
+ - lib/new_relic/agent/llm/response_headers.rb
516
526
  - lib/new_relic/agent/local_log_decorator.rb
517
527
  - lib/new_relic/agent/log_event_aggregator.rb
518
528
  - lib/new_relic/agent/log_event_attributes.rb
@@ -644,6 +654,7 @@ files:
644
654
  - lib/new_relic/recipes/capistrano_legacy.rb
645
655
  - lib/new_relic/recipes/helpers/send_deployment.rb
646
656
  - lib/new_relic/supportability_helper.rb
657
+ - lib/new_relic/thread_local_storage.rb
647
658
  - lib/new_relic/traced_thread.rb
648
659
  - lib/new_relic/version.rb
649
660
  - lib/newrelic_rpm.rb