Commit graph

1184 commits

Author SHA1 Message Date
Patrik Nordwall
0783855b2c
Merge pull request #27552 from akka/wip-26537-slf4j-patriknw
Typed logging with slf4j, #26537
2019-09-06 11:33:56 +02:00
Johan Andrén
5f315100f6 Remove left over mention of using materializer for settings (#27646)
* Remove left over mention of using materializer for settings

* Not a list anymore
2019-09-06 10:19:21 +02:00
Patrik Nordwall
249c2e922d
Merge pull request #27645 from johanandren/wip-27640-watch-termination-sample-downstream-cancel
watchTermination now fails the future on downstream failure
2019-09-06 10:18:16 +02:00
Patrik Nordwall
2bd8c23240
Merge pull request #27643 from johanandren/wip-27639-stream-ref-cancellation-behavior
StreamRefs cancellation behavior
2019-09-06 10:17:43 +02:00
Patrik Nordwall
b5f6f4aa00
Merge pull request #27644 from akka/wip-27642-Materializer.create-patriknw
rename the new Materializer.create to createMaterializer, #27642
2019-09-06 10:15:00 +02:00
Patrik Nordwall
68424b4f55 Complete logging with SLF4J in Typed, #26537
* TestAppender interaction with LoggingEventFilter
  * TestAppender plays the same role as classic TestEventList
* replace Sl4jLoggingEvent.java
  * include MDC in testkit.LoggingEvent to allow for custom filter
    testing MDC
* fix tests
* fix log events in BehaviorSetKit, using SubstituteLogger
* MDC in EventSourcedBehavior
  * using raw MDC to set the persistenceId and persistencePhase fields
  * avoid access to MDC ThreadLocal if log isn't used

* Automatically enable eventStream Slf4jLogger for Typed (PR #27583)
  * amend the ActorSystem config on startup when config akka.use-slf4j=on
    and akka-slf4j in classpath
  * akka.use-slf4j is defined in akka-actor-typed reference.conf
  * also enable the Slf4jLoggingFilter automatically
  * remove config in tests

* Include actor path as akkaSource in MDC (PR #27587)
  * move logger init to ActorContextImpl since not specific to untyped (ActorContextAdapter)
  * careful to not access MDC ThreadLocal if logging isn't used (per message)
  * MDC is cleared (if used) from aroundReceive in ActorAdapter after processing each message
  * also changed MDC for EventSourcedBehavior to rely on context.log and the outer MDC.clear()
  * just removing the MDC values is not enough because the empty Map remains in the ThreadLocal

* Optimization of MDC interceptor (PR #27610)

* Extension methods to Logger as workaround for overload and varargs problem (PR #27605)
  * "ambiguous reference to overloaded definition" for 2 arg method
  * varargs not supported for primitive types
  * providing extension methods info2 and infoN (and friends) via implicit class LoggerOps
    as more convenient workaround for these problems

* New API for Typed LoggingEventFilter (PR #27611)
  * builder style
  * will make it easier to add more conditions
  * all conditions are AND:ed together which makes it easier to define custom filters
  * simplifies the implementation as a bonus
  * javadsl
  * use new api in all tests
  * leeway setting
  * verify that occurrences = 0 works
  * use javadsl in two tests
  * change interceptLogger, and some other feedback

* Testing utility to silence logging until failure (PR #27588)
  * Logback appender that captures all log events and can flush them
    later to other appenders
  * LogCapturing mixin for ScalaTest that flush the captured logging events
    when a test fails. Also clears the captured events after all tests.
  * Configuration in logback-test.xml
  * log capturing for JUnit tests too, using TestRule
  * Silence initial setup logging from Logback
  * make LogCapturing public
  * use LogCapturing in all tests
    * aside from multi-jvm, and a few extending AkkaSpec, so far
  * a few doc tests needed debug level

* mention in migration guide
* rename setLoggerClass to setLoggerName
* check for logback dependency to give nicer error message
* fix filterKeys, deprecated in 2.13
2019-09-06 10:09:54 +02:00
Johan Andrén
f88ee384c3 watchTermination now fails the future on downstream failure #27640 2019-09-06 09:11:57 +02:00
Patrik Nordwall
e80b591115 rename the new Materializer.create to createMaterializer, #27642
* because static methods are resolved by looking at extended class too,
  and that results in ambigious method clash with existing create in
  ActorMaterializer
2019-09-06 09:02:22 +02:00
Johan Andrén
66280846c1 StreamRefs cancellation behavior #27639
* Updated multi-jvm test
* Updated migration guide
2019-09-06 08:55:51 +02:00
Johan Andrén
ed955e0da4 Propagate downstream cancellation failures (#27547)
* Add doc clarification about IOResult on sources
* Better error message for IOOperationIncompleteException

Co-Authored-By: Johannes Rudolph <johannes.rudolph@gmail.com>
2019-09-05 20:55:48 +02:00
Johan Andrén
b68d67008a
Deprecate actor materializer (#27538) 2019-09-05 16:08:37 +02:00
Patrik Nordwall
8765a4fbe6
Merge pull request #27624 from akka/wip-24717-doc-apply-style12-patriknw
doc: stylish fault-tolerance.md, #24717
2019-09-05 14:46:30 +02:00
Johan Andrén
84cd059bb2
Remove the Artery flight recorder (#27591) 2019-09-05 13:11:22 +02:00
Patrik Nordwall
b1465d7f50 doc: stylish fault-tolerance.md, #24717 2019-09-05 12:46:42 +02:00
Patrik Nordwall
525863bb85
Merge pull request #27623 from akka/wip-24717-doc-apply-style11-patriknw
doc: stylish routers.md, #24717
2019-09-05 12:41:54 +02:00
Helena Edelson
29f2eba049 Change "Untyped" to "Classic" (#27627)
* Untyped to classic naming convention #24717
* Added entry of naming convention change to migration docs.
* Rename `toUntyped` to `toClassic` in adapters
2019-09-05 12:30:52 +02:00
Patrik Nordwall
cfdce069b4 Deprecate Cluster Client #27242 2019-09-05 10:24:25 +02:00
Johan Andrén
aca63ea198
Materializer settings as attributes (#27499)
* Replace MaterializerSettings with Attributes #25559 
 * Field access to settings deprecated to make stages use attributes instead
 * Internal stages updated to use attributes
 * Docs on ActorMaterializerSettings updated to recommend away from using it
 * Verify all stages stopped after each testcase in FlowGroupBySpec
 * Subscription timeout attributes merged into one
2019-09-04 13:37:06 +02:00
Patrik Nordwall
b9a879d722
Merge pull request #27619 from akka/wip-24717-doc-apply-style10-patriknw
doc: stylish stash.md, #24717
2019-09-04 10:19:13 +02:00
Patrik Nordwall
c5a4f8eb99 doc: stylish stash.md, #24717 2019-09-04 10:16:10 +02:00
Patrik Nordwall
55d2fd9afd
Merge pull request #27616 from akka/wip-24717-doc-apply-style9-patriknw
doc: stylish actor-discovery.md, #24717
2019-09-04 10:13:10 +02:00
Patrik Nordwall
6bf45641c7
Learning Akka Typed from Classic, #25624 (#27537) 2019-09-04 08:40:14 +02:00
Patrik Nordwall
4b2f1984ec doc: stylish routers.md, #24717 2019-09-04 07:20:46 +02:00
Helena Edelson
a83c14b9aa
Remove mentions of Typed - replaces @@@note of classic/typed with an includes (#27617) 2019-09-03 13:23:47 -07:00
Patrik Nordwall
c206173cad
Merge pull request #27599 from akka/wip-guide-images-patriknw
restore getting started guide images
2019-09-03 14:48:29 +02:00
Patrik Nordwall
48911dbc21
Merge pull request #27613 from akka/wip-24717-doc-apply-style7-patriknw
doc: stylish cluster-sharding.md, #24717
2019-09-03 14:47:39 +02:00
Patrik Nordwall
c25982c9e0 doc: stylish actor-discovery.md, #24717 2019-09-03 14:43:45 +02:00
Patrik Nordwall
b2bef35f0c
doc: stylish getting started tutuorial, #24717 (#27596)
* Move messages from DeviceProtocol to Device (in .java)
* rename Message to Command
* rename createBehavior to create
* rename message handle methods to onX
* private constructor
* get rid of DeviceManagerProtocol too
* rename Message to Command
2019-09-03 13:07:21 +02:00
Patrik Nordwall
c0ee1080b3
Merge pull request #27518 from akka/wip-27437-systemActorOf-patriknw
Remove Future from typed.ActorSystem.systemActorOf, #27437
2019-09-03 13:03:49 +02:00
Patrik Nordwall
9805489e98 doc: stylish cluster-sharding.md, #24717 2019-09-03 13:00:53 +02:00
Patrik Nordwall
072de362d5 doc: stylish cluster.md, #24717 2019-09-03 12:17:34 +02:00
Patrik Nordwall
2bf84daf27 Remove Future from typed.ActorSystem.systemActorOf, #27437
* The reason for the Future was to "prepare" for a world without classic RepointableActorRef
* We can introduce a Future based one later if needed, the naming is anyway more "classic",
  and we can save spawn for the future.
* This also solves the problem that there is currently no Java API for this (returning CompletionStage)
2019-09-03 11:24:12 +02:00
Patrik Nordwall
ba63a16774
Merge pull request #27597 from akka/wip-24717-doc-apply-style4-patriknw
doc: stylish interaction-patterns.md, #24717
2019-09-02 12:45:26 +02:00
Patrik Nordwall
e5794c57bb doc: stylish interaction-patterns.md, #24717 2019-09-02 12:44:48 +02:00
Helena Edelson
186b2bbc70
[Only] Deprecate Persistent mode of Cluster Sharding (#27585) 2019-08-30 07:25:29 -07:00
Patrik Nordwall
eac93eb3ae restore getting started guide images
* those are used in the Typde guide
* were removed when the classic guide was removed, around M3-M4
2019-08-30 10:38:02 +02:00
Patrik Nordwall
8085209920
Remove CallingThreadDispatcher from main dispatchers doc, #27223 (#27593)
* It is described thoroughly in the classic testing docs, and it's
  not something we should promote too much.

* Also move more dispatcher examples to main Dispatchers docs
* Small adjustment of ToC

* review suggestions

Co-Authored-By: Helena Edelson <helena@users.noreply.github.com>
2019-08-29 17:50:57 +02:00
Arnout Engelen
fcd6185265 Move generic mailbox docs from classic to main mailboxes doc (#27493)
* Move generic mailbox docs from classic to main mailboxes doc
* 'Mailbox configuration examples' could still be converted, but let's
keep PR's small
* Clarify configuration mailbox selection

Co-Authored-By: Helena Edelson <helena@users.noreply.github.com>
2019-08-29 14:26:40 +02:00
Arnout Engelen
29b95f166a Improve Java perspective dispatcher docs (#27521) 2019-08-29 14:22:49 +02:00
Patrik Nordwall
70e2db7b8d Clarify that akka-protobuf-v3 is not for applications, #26181 (#27520)
* Clarify that akka-protobuf-v3 is not for applications, #26181
* Update akka-docs/src/main/paradox/project/migration-guide-2.5.x-2.6.x.md
2019-08-29 09:18:18 +02:00
Patrik Nordwall
5f274b6dee Don't run scheduled tasks on shutdown, #16495 2019-08-29 09:15:51 +02:00
Helena Edelson
0fc70c5172
Docs: Slight clarification of what is durable in sharding. (#27582) 2019-08-28 11:08:35 -07:00
Patrik Nordwall
bc2caf866c remove unused sample for classic getting started guide
* guide was removed previously
2019-08-28 14:01:47 +02:00
Helena Edelson
c03cec2979
[2.6 Docs Cleanup] Move things to new Package/Deploy/Run section (#27550) 2019-08-27 07:41:14 -07:00
Patrik Nordwall
32318141fc
doc: stylish actor-lifecycle.md, #24717 (#27543) 2019-08-27 16:16:51 +02:00
Arnout Engelen
3c018c044f
Add monitoring section (#27486)
* Add monitoring section (#27223)

* Make it a little less sparse

* Update akka-docs/src/main/paradox/additional/monitoring.md

Co-Authored-By: Peter Vlugter <pvlugter@users.noreply.github.com>

* Further suggestions

* Update akka-docs/src/main/paradox/additional/observability.md

Co-Authored-By: Helena Edelson <helena@users.noreply.github.com>
2019-08-27 10:18:58 +02:00
Johan Andrén
45c826a218
System wide materializer (#27491)
Introduces a materializer started through an extension and then an implicit
conversion for Scala turning an implicitly available ActorSystem into a
materializer. The Java APIs has been ammended with run-methods accepting
an ActorSystem.
2019-08-23 18:19:27 +02:00
Christopher Batey
d6289c7e7c Clean up of utilities docs
* Removes sections that describe language features: Futures and Duration
* Keeps section for logging and circuit breaker
* Keep logging as is for now, to be updated with the Typed SL4J logging

Creates issues for
* Documenting typed extensions https://github.com/akka/akka/issues/27448
* Future interactions in https://github.com/akka/akka/issues/27449

Refs #27223

Add redirects from removed pages to 2.5 docs

Make indexes complete and fix link

'Classic' in the title for docs for classic API's
2019-08-23 14:54:20 +02:00
Patrik Nordwall
b6f4e768aa
Merge pull request #27541 from akka/wip-24717-doc-apply-style1-patriknw
doc: stylish actors.md, #24717
2019-08-23 13:49:05 +02:00
Patrik Nordwall
cd6822dec6 doc: stylish actors.md, #24717 2019-08-22 11:14:11 +02:00